I have a form where I’ve specified onSubmit="validate()", but I want to ignore the validation if the submit-button was clicked. Is there a good cross-browser way of detecting if the submit button was clicked and thus ignoring the validation?
I have a form where I’ve specified onSubmit=validate() , but I want to ignore
Share
Why don’t you use a button instead of a submit, and set it’s action on the click of the button? That way you can control if you want to validate, submit, or whatever else you like.