FFFFFFFUUUUUUUUUUUUUUUUUU |
FFFFFFFUUUUUUUUUUUUUUUUUU |
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. |
|
|
Mar 11 2010, 11:07 PM
Post
#2
|
|
Mel Blanc was allergic to carrots. Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 |
I'm pretty sure it needs a form action.
|
|
|
Mar 12 2010, 02:55 AM
Post
#3
|
|
Senior Member Group: Administrator Posts: 2,648 Joined: Apr 2008 Member No: 639,265 |
You didn't specify a method. The default method is GET, which just puts the form values in the URL query string.
|
|
|
Mar 12 2010, 09:57 PM
Post
#4
|
|
/人◕‿‿◕人\ Group: Official Member Posts: 8,283 Joined: Dec 2007 Member No: 602,927 |
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?
|
|
|
Mar 13 2010, 10:57 AM
Post
#5
|
|
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> |
|
|
Apr 2 2010, 01:00 PM
Post
#6
|
|
Senior Member Group: Administrator Posts: 8,629 Joined: Jan 2007 Member No: 498,468 |
Topic Closed, and Moved to Resolved Topics. Please PM a moderator if you would like this reopened.
|
|
|