SQL PHP HTML JavaScript articles and free code
 

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 and the value is taken to a new window.

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



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

<form name=f1 type=post action=test5.html>

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


Form Fields  | Text Field  | Hidden Field  | Password Field  | TextArea  | RadioButton  | Checkbox  | Button  | Image Button  | Submit Button  | Reset Button  | Drop-Down Menu
Discuss this tutorial at forum

List of HTML Tutorials

 

Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.

Scripts
PHP
JavaScript
List of HTML Tutorial
<Form>
HTML Tags
Color Chart
HTML Calendar
Tags on web page
Web Design
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.