Click to See Complete Forum and Search --> : input inside the link


MadCommando
07-17-2003, 11:19 PM
I'm not sure quite how to do it, but on many websites you'll see the url has a ? and what appears to be variables being declared inside the link, is there a way I can use a method like this to set values for a form input? so if someone clicked my link
example:
http://www.mysite.com/site.html?theform.textinput.value="this is my input"

or is the ? think only in php

one final question, if this method won't work, is there a way I could do this by another means?

Exuro
07-17-2003, 11:27 PM
When there's a ? in a url it is usually caused by a form with the attribute method="get" set. I guess you could try to use it to set your inputs, but I'm not sure how you'd do it without Server-Side scripting... I know in php you just use $_GET['varname'] to get the values from the url, but I don't know if JavaScript has anything like that... I guess you could always try taking the parent.location, then spit it up into pieces separated by ?s or something... Then you could use those values to set your inputs, but it sounds like more work than it's worth to me... You could try it if you want though, no one's stopping you! Or maybe someone else here on the forum knows a way?