Form submitting data to new window and to two different pages

We can use two different buttons to submit the form to two different pages. One of the buttons can submit the form in a new window. You can read the article on how to open the action page of the form in new window. This is required in different occasions where the visitor can see check and decide on which page to use.

We can use the same form to submit to two different pages. The demo below will submit a form to two different pages.

For example we can show a printer friendly page to the visitor on its entered value in a new window. The visitor can check the values in new window and close it also. Again the visitor can do changes in main window and check the printer friendly page. Once satisfied, the visitor can finally submit the page for processing. Here is the example showing two buttons, one is submitting the form to same page and other is submitting to a new page by opening a new window.

You can see the two buttons below and one will open the test5.html page in this window and the other button will open test6.html in a new window ( keeping this window in same page ).

Here is the demo with two submit buttons to submit form to two different pages.



Here is the code for the above form with the submit button.

<form name=f1 method=post action=test5.php>

<input type='submit' value='Open default action file test5.php' onclick="this.form.target='_blank';return true;">
<input type='submit' value='Open test6.html' onclick="f1.action='test6.php'; return true;"> </form>

Submit form to a new window

Number of User Comments : 7


Google+
kundan

27-06-2014

nice help me alot thanks
osiris

17-08-2014

very nice helped me alot thx
bol

12-09-2014

You are the best
vishnu

20-09-2014

this is very useful thanks i got my problem solution from here ..
ekke

16-10-2014

Yupp, it helped to solve my problem. Thanks!
peter

09-12-2014

thanks man! :)
san

17-04-2015

this is very useful thanks i got my problem solution from here ..
Thank you so much..... :)
Keep us updating such nice codes

Post Comment This is for short comments only. Use the forum for more discussions.






OPINION POLL

How you handle Search Engine Optimization ( SEO ) for your website
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2015 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer