Submitting form to a new window

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.

This is done where graphs are to be generated on the fly based on the selection of options within a form by the visitor. For example, we are showing price trend for different months where visitor has to select month from a list.
After selection of the month we can submit the form to a new window to show the graph of the price trend. Visitor can close the graph window and select another month to see the price trend. So in the main window the form remains constant (open ) and the value is taken to a new window.

Here is the demo to open a new window ( new tab ) with the form value.


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

<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>
Visitors Rating
Your Rating





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 ..

Post your comments , suggestion , error , requirements etc here .




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer