[thelist] JS: test which submit button was clicked.
apathetic
timbooker at gmail.com
Fri Jun 4 12:46:27 CDT 2004
> Nice! But does it have to be in the onClick? If the function is called
> by the onSubmit handler, will the .clicked property not work?
When you click a submit button, the onclick even will fire followed by
the onsubmit. The clicked property will be set onclick, and then the
validation is called onsubmit.
Usually I would advise against using onclick for submit buttons.
However, in this instance you are specifically testing for a user
clicking a particular button, so onclick is necessary.
Tim
More information about the thelist
mailing list