With the Validate plugin, when settings.submitHandler is set and user
tries to submit the form, the script intercepts this and will always
block the submission (by returning false from the onsubmit event).

This can easily be extended to allow the submitHandler function to
return a boolean value, when can then in turn be the return value for
the onsubmit event.

For example, this would allow:

$('#myform').validate({
submitHandler: function(form) {
return window.confirm('Are you sure?');
}
});

Reply via email to