O
Oleg Konovalov
Hi,
I am working on Struts/HTML/Javascript application.
Have 2 buttons on the page, Save and Cancel,
both are supposed to bring me to the same page,
but Save also performs validation, and Cancel - should not.
Both buttons are of Submit type and have same name ("SubmitValue"), e.g.:
<input type="submit" id="SaveBtn" name="submitValue" value="Save">
So how do I distinguish which button was clicked on Submit for the form:
<form name="input" onClick="if (??? = "SaveBtn") return validate()" >,
how do I capture that id=SaveBtn in JavaScript ?
Thank you in advance,
Oleg.
I am working on Struts/HTML/Javascript application.
Have 2 buttons on the page, Save and Cancel,
both are supposed to bring me to the same page,
but Save also performs validation, and Cancel - should not.
Both buttons are of Submit type and have same name ("SubmitValue"), e.g.:
<input type="submit" id="SaveBtn" name="submitValue" value="Save">
So how do I distinguish which button was clicked on Submit for the form:
<form name="input" onClick="if (??? = "SaveBtn") return validate()" >,
how do I capture that id=SaveBtn in JavaScript ?
Thank you in advance,
Oleg.