<input type='submit' value='Open default action file test5.php'
onclick="this.form.target='_blank';return true;">
<input type='submit' value='Open test6.php'
onclick="f1.action='test6.php'; return true;">
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.
<form name=f1 method=post action=test5.php>
<input type=text name=name value='plus2net'>
<input type='submit' value='Open default action file test5.php'
onclick="this.form.target='_blank';return true;">
<input type='submit' value='Open test6.php'
onclick="f1.action='test6.php'; return true;">
Submit form to a new Window HTML and JavaScript Code for Back to Previous Page 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 |
pratish | 12-11-2018 |
+1...it helps me a lot if......Can it redirect with _POST method will all the form field name? If another php want to POST all form field. |
smo1234 | 25-11-2018 |
You can add all form field names to the form. After receiving you can redirect to any page. |
25-04-2020 | |
this is genius, thanks a lot. |