[thelist] JS: test which submit button was clicked.
Tom Dell'Aringa
pixelmech at yahoo.com
Fri Jun 4 10:03:29 CDT 2004
--- Tab Alleman <Tab.Alleman at MetroGuide.com> wrote:
> I have a form with multiple submit buttons, all with the same name
> and different values.
Why?
>
> In the onSubmit handler, I want to test which submit button was
> clicked and do something...what property do I test?
>
> When I test:
>
> document.forms[formname].SubmitButtonName.value
The value of your submit button is equal to the VALUE attribute you
set, which must not be set.
You could check which NAME - except you named them the same. You
could give them unique IDs. A little more info on what you are trying
to accomplish would help...
Tom
=====
http://www.Pixelmech.com/ - read my latest blog posting!
http://www.crossandthrone.com/ - Eternal Life
John 3:16
More information about the thelist
mailing list