PDA

View Full Version : Submit form in a new window


pharma
11-05-2002, 05:06 PM
Whenever a visitor fills a form and submits it, can I make a new window to pop up and the form will be submitted there? I mean, can I submit a form in a new window?

webmarkart
11-05-2002, 05:54 PM
If I understand the question, Sure, why not? You want to have a popup window with a form that a user can submit? How depends on what languages you plan on using...

pharma
11-05-2002, 06:07 PM
No. What I mean is that whenever a visitor clicks on the submit button, a new window will pop up and redirecting him to the thank you page leaving the parent window unmoved..

webmarkart
11-05-2002, 06:08 PM
Sure, thats possible, what languages do you know?

pharma
11-05-2002, 06:22 PM
Oh my, do we need that? I thought we could insert a tag here: <form name="myform" method="get" action="http://www.solidscripts.com/mail/formmail2.asp">

Roy Sinclair
11-05-2002, 06:43 PM
Add target="_blank" to the <form> tag and the result of the submit will be sent to a new window. It's just that simple.

webmarkart
11-05-2002, 06:52 PM
its that simple, but you can make it fancy if you know other languages, thats all.

pharma
11-05-2002, 06:56 PM
Oh ok. Thanks

Nightfire
11-05-2002, 07:14 PM
Or have control over your window size, etc


<script type="text/javascript" language="javascript">
<!--
function openPopup(){
window.open("","_popup","toolbars=0,location=0,width=180,height=70");
return true;
}
//-->
</script>

Then in your form tag

<form (form stuff) target="_popup" onsubmit="return openPopup()">

pharma
11-05-2002, 07:32 PM
Oh thanks! It'll be a big help.