This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#151 2011-06-07 17:13:48

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: Go Everywhere Beta

comp500 wrote:

RUMCHEERYPOOPOO wrote:

you have to use the variable

Code:

document.form.textarea.value

for 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 AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#152 2011-06-07 17:24:52

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: Go Everywhere Beta

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):
Example

Code:

<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 AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#153 2011-06-07 17:28:44

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

Can I suggest these 'basic' HTML/JScript questions should be 'google-d' not discussed.


You can now reach me on Twitter @johnnydean1_

Offline

 

#154 2011-06-07 17:37:45

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: Go Everywhere Beta

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


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#155 2011-06-08 02:38:12

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

johnnydean1 wrote:

Do you know what PHP is for?

file upload




my 440th post!

Last edited by comp500 (2011-06-08 02:59:00)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#156 2011-06-08 02:42:53

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

jslomba wrote:

can I be a tester/advertizer?

yup. which device will you test on?


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#157 2011-06-08 02:45:54

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

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.  smile


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#158 2011-06-08 02:48:35

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

3DSfan12345 wrote:

I could advertise.

click on the link in the main post but wait till the name is not scratch everywhere


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#159 2011-06-08 02:54:43

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

RUMCHEERYPOOPOO wrote:

comp500 wrote:

RUMCHEERYPOOPOO wrote:

you have to use the variable

Code:

document.form.textarea.value

for 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  smile


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#160 2011-06-08 02:57:34

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

RUMCHEERYPOOPOO wrote:

comp500 wrote:

rdococ wrote:

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):
Example

Code:

<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)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#161 2011-06-08 03:04:38

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

Guys, Scratch emailed me and said I have to change the name because it has scratch in it. Any ideas?


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#162 2011-06-08 11:59:14

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

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?


You can now reach me on Twitter @johnnydean1_

Offline

 

#163 2011-06-08 12:20:42

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: Go Everywhere Beta

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 AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#164 2011-06-08 12:38:52

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Go Everywhere Beta

I'm finding a lack of things to test out on the 3DS...

P.S. Look what I found! http://3dspaint.com/


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#165 2011-06-08 12:58:23

3DSfan12345
Scratcher
Registered: 2011-04-02
Posts: 500+

Re: Go Everywhere Beta

I could host, advertise, test for iPod touch, and maybe even do mockups.


R.I.P Scratch 1.4
July 7,2009-May 5,2013

Offline

 

#166 2011-06-08 13:08:53

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

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  tongue


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#167 2011-06-08 13:10:11

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

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)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#168 2011-06-08 13:11:57

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

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


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#169 2011-06-08 13:16:05

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

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.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#170 2011-06-08 13:17:55

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

3DSfan12345 wrote:

I could host, advertise, test for iPod touch, and maybe even do mockups.

OK!


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#171 2011-06-08 16:05:51

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

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?


You can now reach me on Twitter @johnnydean1_

Offline

 

#172 2011-06-08 16:19:40

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Go Everywhere Beta

How do I test it for the android? Can I get some steps.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#173 2011-06-09 03:05:35

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

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?

?


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#174 2011-06-09 03:07:01

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

comp500 wrote:

Guys, Scratch emailed me and said I have to change the name because it has scratch in it. Any ideas?


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#175 2011-06-09 03:08:32

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

Pecola1 wrote:

How do I test it for the android? Can I get some steps.

Soon there will be a link to go to.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

Board footer