comp500 wrote:
RUMCHEERYPOOPOO wrote:
you have to use the variable
Code:
document.form.textarea.valuefor the text param
where form is the name of the form ( <form name="whatever"> )
and text area is the name of the text area (same as above except with textarea tag).you don't. you can use id... or classs...
Er... you can do it either way, I suggest you do it my way as using form names is much more useful for the php side of things (it is impossible to handle forms using php without the use of form names) see this article: http://www.mediacollege.com/internet/ja … -text.html but it's your thing so feel free to do it with getElementById just my suggestion is not to.
Offline
comp500 wrote:
rdococ wrote:
comp500 wrote:
It's the parameters.
for example when you call it i think u use this:Code:
alert(getLine(text, 5));if text is the text in the textarea, it will say line five of the text in an alert box.
So you can create things like reporters in Javascript?
Yup. use
Code:
return
One thing, return is used for functions in returning a value I quote W3 Schools:
http://www.w3schools.com/js/js_functions.asp wrote:
The return Statement
The return statement is used to specify the value that is returned from the function.
So, functions that are going to return a value must use the return statement.
The example below returns the product of two numbers (a and b):
ExampleCode:
<html> <head> <script type="text/javascript"> function product(a,b) { return a*b; } </script> </head> <body> <script type="text/javascript"> document.write(product(4,3)); </script> </body> </html>
What you can do is use
document.write('Insert Text Here');
but this will rewrite the whole page if used in a function or after the page has loaded, so it is best to use
document.getElementById('InsertIdHere').innerHTML = 'Insert Text Here';
As this only writes and replaces content within the area of that Id (You can insert one of these areas using a div tag).
Offline
Can I suggest these 'basic' HTML/JScript questions should be 'google-d' not discussed.
Offline
I'm just proving a point, if he's googled it and got the wrong answer, or is just misinformed, better to tell him than let him struggle and fail when he needs to use it
Offline
Necromaster wrote:
So is this going to be an online project or what? Playing scratch projects with portable devices, or making projects with portable devices?
It is a web project to allow creation and viewing of scratch projects.
Offline
RUMCHEERYPOOPOO wrote:
comp500 wrote:
RUMCHEERYPOOPOO wrote:
you have to use the variable
Code:
document.form.textarea.valuefor the text param
where form is the name of the form ( <form name="whatever"> )
and text area is the name of the text area (same as above except with textarea tag).you don't. you can use id... or classs...
Er... you can do it either way, I suggest you do it my way as using form names is much more useful for the php side of things (it is impossible to handle forms using php without the use of form names) see this article: http://www.mediacollege.com/internet/ja … -text.html but it's your thing so feel free to do it with getElementById just my suggestion is not to.
i use jQuery
Offline
RUMCHEERYPOOPOO wrote:
comp500 wrote:
rdococ wrote:
So you can create things like reporters in Javascript?
Yup. use
Code:
returnOne thing, return is used for functions in returning a value I quote W3 Schools:
http://www.w3schools.com/js/js_functions.asp wrote:
The return Statement
The return statement is used to specify the value that is returned from the function.
So, functions that are going to return a value must use the return statement.
The example below returns the product of two numbers (a and b):
ExampleCode:
<html> <head> <script type="text/javascript"> function product(a,b) { return a*b; } </script> </head> <body> <script type="text/javascript"> document.write(product(4,3)); </script> </body> </html>What you can do is use
Code:
document.write('Insert Text Here');but this will rewrite the whole page if used in a function or after the page has loaded, so it is best to use
Code:
document.getElementById('InsertIdHere').innerHTML = 'Insert Text Here';As this only writes and replaces content within the area of that Id (You can insert one of these areas using a div tag).
I h8 document.write! use innerHTML!
Its easier!
EDIT: lol i didn't notice the bit at the bottom!
Last edited by comp500 (2011-06-08 03:02:36)
Offline
comp500 wrote:
johnnydean1 wrote:
Do you know what PHP is for?
file upload
my 440th post!
No, its for server data exchange.
And are you sure the email is legit?
Offline
PHP is for server side programming which is executed when the page is requested by your browser. The browser requests the page, the server runs the code and sends the page to the user with the output.
Offline
I'm finding a lack of things to test out on the 3DS...
P.S. Look what I found! http://3dspaint.com/
Offline
I could host, advertise, test for iPod touch, and maybe even do mockups.
Offline
whizzer wrote:
I'm finding a lack of things to test out on the 3DS...
P.S. Look what I found! http://3dspaint.com/
I found it first
Offline
johnnydean1 wrote:
comp500 wrote:
johnnydean1 wrote:
Do you know what PHP is for?
file upload
my 440th post!No, its for server data exchange.
And are you sure the email is legit?
2.yup cos i emailed scratch anyway and that email was the reply, it was from help@scratch.mit.edu
Last edited by comp500 (2011-06-08 13:12:16)
Offline
johnnydean1 wrote:
comp500 wrote:
johnnydean1 wrote:
Do you know what PHP is for?
file upload
my 440th post!No, its for server data exchange.
And are you sure the email is legit?
1.that as well
Offline
RUMCHEERYPOOPOO wrote:
PHP is for server side programming which is executed when the page is requested by your browser. The browser requests the page, the server runs the code and sends the page to the user with the output.
I knowwwww.
Offline
comp500 wrote:
johnnydean1 wrote:
comp500 wrote:
file upload
my 440th post!No, its for server data exchange.
And are you sure the email is legit?2.yup cos i emailed scratch anyway and that email was the reply, it was from help@scratch.mit.edu
How about WebDragDrop or WDD?
Offline
How do I test it for the android? Can I get some steps.
Offline
johnnydean1 wrote:
comp500 wrote:
johnnydean1 wrote:
No, its for server data exchange.
And are you sure the email is legit?2.yup cos i emailed scratch anyway and that email was the reply, it was from help@scratch.mit.edu
How about WebDragDrop or WDD?
?
Offline