Log In · Register

 
FFFFFFFUUUUUUUUUUUUUUUUUU
heyo-captain-jac...
post Mar 11 2010, 10:29 PM
Post #1


/人◕‿‿◕人\
*******

Group: Official Member
Posts: 8,283
Joined: Dec 2007
Member No: 602,927



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.
 
 
Start new topic
Replies
mipadi
post Mar 13 2010, 10:57 AM
Post #2


Senior Member
******

Group: Administrator
Posts: 2,648
Joined: Apr 2008
Member No: 639,265



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>
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: