Click to See Complete Forum and Search --> : two submitbuttons in one form and validation


togi93ab
07-28-2003, 01:56 PM
Hello,

I have a form with two submit buttons. When I press buttonA, I want to do some evaluation on control a, b, c, and d.

When I press buttonB, I want to validate control e.

How do I know which submit button was pressed, so I can call only the needed validation in my function validate()? I use an onsubmit eventhandler.

(When I press buttonB, I currently evaluate all controls.) Thanks for your help.

Togi

Nevermore
07-28-2003, 01:59 PM
You can probably do this with some complex workaround using event handlers, but I think it would probably be easier to use onclick="" rather than onsubmit.