![]() Topic awaiting preservation: variables in URL from form (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: everywhere |
![]() Say I have a form (which thinking about it, I do), which you fill in, then you click one button to email it to me (all already done through php) and another button to sign my guestbook. The way I've done the second is to open a new window with the URL of the guestbook CGI, with the values in the form appended to the URL via JavaScript (can't remember if this is POST or GET). Trouble is, one of the form elements is a multi-line textarea, and forced line breaks don't convert into the URL. Is there some special character I can use, and how do I replace the line breaks with it using JavaScript? |
Maniac (V) Inmate From: Brisbane, Australia |
![]() Ok, this is more of a server side problem. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
![]() quisja: I wouldn't pass the contents of a textarea via a URL (GET by the way |
Paranoid (IV) Inmate From: everywhere |
![]() Drac: I think you misunderstood slightly, I wasn't actually submiting a form, I just used Javascript to make a string (URL/?this=blah&that=blah) which I then opened in a new window. The page I am submitting to isn't something I can modify, so I don't want to mess about making a php script which it will all have to go through. I wasn't sure if this was a good way at the time. So is there a way for a form to have two submit buttons, which change it's action property depending on what you want it to submit to? |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() sure. you could do something like this |