Contact Us

Let us know to help you out quickly!

 Admin User     Feb,08 2017

Submit Form To A New Window, With Features

To submit form to new window, we set the target attrubutes to '_blank'. But we can't set the new window's property such as height, width etc. So to submit the form to new window with '' features, Let's look at the below code.

 <html><head><script type="text/javascript">function submitForm(){ = "myActionWin";"","myActionWin","width=500,height=300,toolbar=0");document.form1.submit();}</script></head><body><form name="form1" action="demo_action.cfm" method="post">First name: <input type="text" name="fname" /><br />Last name: <input type="text" name="lname" /><br /><input type="button" name="btnSubmit" value="Submit" onclick="submitForm()" /></form></body></html> 

First of all I set the target attribute of my form (form1) to 'myActionWin' which is the name of the target window (or can be the target frame). Then Open the new window having the name 'myActionWin' and set the window property whatever you want with the And Lastly submit the form.