Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q431 How can I post form results to multiple windows depending on the submit button the user clicks on?

You are here: irt.org | FAQ | JavaScript | Form | 7.2 | Q431 [ previous next ]

The following changes the forms target when a button is clicked, it should work okay in Netscape Navigator and Internet Explorer 4:

<FORM TARGET="_top">
<INPUT TYPE="BUTTON" onClick="alert(this.form.target)" VALUE="Show Target">
<INPUT TYPE="BUTTON" onClick="this.form.target = 'awindow'" VALUE="Change Target">
</FORM>

If you need it to work in Internet Explorer 3 you'll need to use JavaScript to collect the forms name-value pairs and then open up a popup window and then pass that across. Take a look at the article Passing data from one form to another.

©2018 Martin Webb