|
|
Q880 How could I make a form with multiple actions?
irt.org | Knowledge Base | JavaScript | Form 7.2 | Q880 [ previous next ] Q880 How could I make a form with multiple actions?A forms ACTION attribute can be amended in Netscape Navigator 2+ and Microsoft Internet Explorer 4+. This poses a slight problem. In Netscape Navigator it is simply a case of:
However, to avoid this causing problems in Microsoft Internet Explorer 3, then you'll need to do:
Or, to support Microsoft Internet Explorer 4, which can amend the ACTION attribute:
But this doesn't answer the original question. One answer is to actually create two forms with their own different ACTION attibutes, and then use JavaScript to control which form is submitted. If the forms need to share the same form data, then the data needs to be copied between the forms before submission. The following example shows how to use JavaScript to add another form with its own ACTION attribute around an existing HTML form. If JavaScript is not enabled or supported, then only the HTML form will be rendered by the browser:
Feedback on 'Q880 How could I make a form with multiple actions?' |
-- div -->
|