Posted by: itanium Mar 11 2010, 10:29 PM
the relevant part of my code:
CODE
<form name="url"><input type="textarea" name="href" value=""><img src="/1x1t.gif" onClick="location.href=document.url.href.value;; ">
</form>
It's supposed to take me to
example.com/example/, but it takes me to
example.com/?href=example. what do
I see it only takes me to ?href=example if I press enter to submit, if I click the image it works. I do not like this one bit.
Posted by: Mikeplyts Mar 11 2010, 11:07 PM
I'm pretty sure it needs a form action.
Posted by: mipadi Mar 12 2010, 02:55 AM
You didn't specify a method. The default method is GET, which just puts the form values in the URL query string.
Posted by: itanium Mar 12 2010, 09:57 PM
I completely stopped working with web programming/scripting six or seven months ago, so I'm a bit rusty. Mind giving a bit more detail?
Posted by: mipadi Mar 13 2010, 10:57 AM
You have to specify the action, which is the URL that will handle the form (in this case, /example), and optionally, a method -- POST will prevent the form data from being put into the URL query string.
HTML
<form method="post" action="/example/">
<textarea name="href"></textarea>
<input type="submit" value="Go">
</form>
Posted by: manny-the-dino Apr 2 2010, 01:00 PM
Topic Closed, and Moved to Resolved Topics. Please PM a moderator if you would like this reopened.