Submitting to a new window

Submitting to a new window

  
It is possible to submit a form to a new window just by adding an extended property to a button. This may be useful when you don't want the current page to disappear while you submit a form... Doing a preview, performing a search or consulting a lookup table are all examples of situations were this can be used.

To enable this behavior add the extended property "onclick" to the button and set its value to "this.form.target='mywindow';". When the user clicks the button, a new window will appear with the submit result. Note that if the user clicks the button again, the same window will be used provided it is still open. If you want to open a new window each time, set the value to "this.form.target='_blank';"

There is a side effect in this script that must be taken into account. When you click the button you set the submit destination of this page to a new window. If there are other submit buttons or links they will all open new windows... to avoid this add the following code to other submit buttons or links in your page: "this.form.target='_self';"