[thelist] JS: test which submit button was clicked.

Tab Alleman Tab.Alleman at MetroGuide.com
Fri Jun 4 12:17:41 CDT 2004


apathetic wrote:
> Because you've created multiple buttons with the same name, what you
> now have is an array of input buttons.  I would suggest adding a
> custom property to the button onclick, and then looping through the
> array of buttons and testing which has been set.

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?  

If it *is* in the onClick property, will returning false prevent the
form from being submitted?


More information about the thelist mailing list