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

#1 2011-08-08 15:34:01

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Html Help!

I need soe help with HTML! How would I make it so that if the user put some text in a box, when they press 'Get my URL now! it would have some text before like:

[Put your text here]

[Get my URL Now!]

Your URL is: abcdefg.com/[TEXT].abc

e.g:

http://i54.tinypic.com/qp5gnd.jpg

Last edited by Servine (2011-08-08 15:42:35)


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#2 2011-08-08 15:35:13

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Html Help!

I'm not exactly sure what you want. Coudl you say it clearer?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#3 2011-08-08 15:42:24

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: Html Help!

WindowsExplorer wrote:

I'm not exactly sure what you want. Coudl you say it clearer?

http://i54.tinypic.com/qp5gnd.jpg


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#4 2011-08-08 16:38:07

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Html Help!

javascript is all I have to say.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#5 2011-08-08 16:53:08

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Html Help!

Code:

<input type="text" size="50" id="text" /><br />
<a href="javascript: var text = document.getElementById('text').value; document.write('Your url is: test123.com/'+text+'.txt');">Press me for your url</a>

I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#6 2011-08-08 17:22:25

Mcsugarface
Scratcher
Registered: 2009-11-16
Posts: 100+

Re: Html Help!

Lol. Javascript is your best choice. There's also PHP, but it would have to reload the page, unless uyou use Ajax. Nuff' said.  tongue


Hi! I'm http://blocks.scratchr.org/API.php?user=USERNAMEHERE&amp;action=onlineStatus&amp;type=text!
http://internetometer.com/imagesmall/11070.png

Offline

 

#7 2011-08-08 17:32:24

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Html Help!

php I would avoid, because javascript is easier


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#8 2011-08-08 17:46:46

Mcsugarface
Scratcher
Registered: 2009-11-16
Posts: 100+

Re: Html Help!

GP1 wrote:

php I would avoid, because javascript is easier

Yeah.  tongue


Hi! I'm http://blocks.scratchr.org/API.php?user=USERNAMEHERE&amp;action=onlineStatus&amp;type=text!
http://internetometer.com/imagesmall/11070.png

Offline

 

#9 2011-08-09 05:40:41

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: Html Help!

GP1 wrote:

Code:

<input type="text" size="50" id="text" /><br />
<a href="javascript: var text = document.getElementById('text').value; document.write('Your url is: test123.com/'+text+'.txt');">Press me for your url</a>

thankyou.


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#10 2011-08-09 19:45:23

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Html Help!

Are you basically working on a tinyurl system? taking an URL and turning it into a shorter one? You'll need MySQL to store the conversion choice, but this has been done already  wink


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#11 2011-09-01 14:27:46

Thehero
Scratcher
Registered: 2010-02-15
Posts: 93

Re: Html Help!

sparks wrote:

Are you basically working on a tinyurl system? taking an URL and turning it into a shorter one? You'll need MySQL to store the conversion choice, but this has been done already  wink

No, she is trying you to enter you website link, you press the button and bellow the button it says the exact thing you entered in the box. And I can make a tinyurl system if you want.

Offline

 

#12 2011-09-01 16:59:30

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: Html Help!

Yeah  tongue  Just give every link an id in the database and convert it to base-36 (a to z and 0 to 9, 36 characters)


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

Board footer