PDA

View Full Version : Please Help With Forms



zazoo
July 9th, 2001, 10:42
ok im fairly new to forms but is there a really simple way I could make a form that makes what they typed show up in the adress bar?


this is what I mean,
you have a text box, you have a button and you type bla in the box then your browser goes to www.somesite.com/bla when you press the button

is there a way to do this without a cgi script and just a form? thanks

gyrbo
July 9th, 2001, 11:04
Use a javascript:


<form name="form">
<input type="text" name="url">
<input type="button"
OnClick="top.location.href='http://www.somesite.com/'+form.url.value;" value="Go">
</form>

zazoo
July 9th, 2001, 11:53
hurrah!
thanks it worked perfectly for what needed

niv
July 10th, 2001, 09:09
or make it <form action="blahblahblah.cgi" method="get">

i believe that works..

gyrbo
July 10th, 2001, 09:33
You still need to write a perl or PHP script then.

niv
July 10th, 2001, 09:44
Originally posted by gyrbo
You still need to write a perl or PHP script then.

oops...i didn't read zazoo's post carefully enough...sorry :o

zazoo
July 10th, 2001, 20:54
:D