This is probably not your usual \"How do I capture form submit events?\" question.
I\'m trying to understand precisely how form submit events are handled by jQu
Bind to the form's submit handler with jQuery and prevent the default action, then, when you want to submit the form, trigger it directly on the form node.
$("#formid").submit(function(e){
// prevent submit
e.preventDefault();
// validate and do whatever else
// ...
// Now when you want to submit the form and bypass the jQuery-bound event, use
$("#formid")[0].submit();
// or this.submit(); if `this` is the form node.
});
By calling the submit
method of the form node, the browser does the form submit without triggering jQuery's submit handler.