jwebhost
01-31-2010, 12:15 PM
Guys, I have completely forgotten how to do this.
How do you make a form that goes to a directory depending on the text entered into a text box?
For example if you type "hello" in the text box, it will take you to: http://DOMAIN.com/hello
I've forgotten.
=/
Thanks
Joe
jacobcolton
01-31-2010, 12:19 PM
Hi Joe,
In which language?
Regards,
Jacob
jwebhost
01-31-2010, 12:25 PM
Oh yea, Javascript if possible?
My mind has gone completely today, I think the JD + coke's i had last night didn't do me much good =/
:P
mattle
02-01-2010, 12:38 AM
The jQuery version:
<input type="text" onChange="window.location.replace('/' + $(this).val())"/>
Although, I have to admit, I have no idea what you'd use this for...how is this any more convenient than typing the same thing in your address bar?
jwebhost
02-01-2010, 09:17 AM
Its for a little peice of software i'm making for a primary school intranet. As the kids are only 3-7 years old, they cant spell most words.
Its only to go in after the scripts and stuff really once its worked out what they've typed.
Thanks :)