Forum Moderators: open
<input type="hidden" name="subscribe" value="url/subscribe.htm"> I want to put the response in a pop up window rather than a new page i.e. "Thank you for your interest"
How do I get:
value="url/subscribe.htm"> into a new window?
<form action="submit.cgi">
The only way I can think of, off the top of my head, is to use JavaScript to take all the values from your form, encode them into a format suitable for a url, and then use window.open(desturl,'windowname','windowoptions') to post to the actual form submission script. desturl would then be the url and the contents of each form element e.g.
submit.cgi?name=forename%20surname&age=25&blah=...
HTH,
JP
The form action is a separate script on the server which gets the variable "subscribe" and then displays the url. I just want to put that URL in a new pop-up window.
That cannot be done server side. Opening new windows can only be done through JavaScript on the client side. Therefore, see above, or get the cgi program to return the filled out form (or empty form?) but with a
OnLoad="window.open('url/subscribe.htm','','');" in the body tag.
JP