[Javascript] selecting between multiple submit buttons
Paul Novitski
paul at juniperwebcraft.com
Wed Jul 25 09:49:39 CDT 2007
At 7/22/2007 06:37 AM, jm wrote:
>i have a form that uses multiple submit buttons: one to select from a
>dropdown list of menu options, one to add a new record or update an
>existing record depending on which is appropriate at the time, and one
>to delete an existing record. i use the following as the trigger for
>onsubmit
...
>sadly, it doesn't know how to distinguish between which submit button
>is being selected.
Joe,
You don't need JavaScript to solve this problem. HTML solved it from
the beginning. When a form contains multiple submit buttons, the
value of only the button clicked is passed in the POST or GET array.
Regards,
Paul
__________________________
Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
More information about the Javascript
mailing list