<input type='submit' value='Open default action file test5.php'
onclick="this.form.target='_blank';return true;">
A form can be submitted to different window or to a new window. The action page of the form can be opened in a new window by passing all the form element values to it. 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.html>
<input type=text name=name value='plus2net'>
<input type='submit' value='Open default action file test5.php'
onclick="this.form.target='_blank';return true;">
</form>
Submit form data to two different Windows Code for Back to Previous Page Mohamed Osama | 25-11-2015 |
Thanks it's works fine with me :) to open new tab after submit |
amlan roy | 22-08-2016 |
Thank u soo much .. |
29-03-2021 | |
Finally, my problem was solved. |
28-01-2023 | |
You can also put `target="_blank"` in the form tag. <form action=.. target="_blank"> This doesn't use any javascript. |