I have a options variable for the jquery form plugin.
It has a function beforeSubmit. Now i want to validate the form for which i want to stop the execution of the code.
How can i stop jQuery to run the code. Currently i m using throw "error" for example -
var options = {
beforeSend: function(e)
{
$("#progress").show();
//clear everything
$("#bar").width('0%');
$("#message").html("");
$("#percent").html("0%");
throw "error";
}, ....
Please see the example here
Regards,
jQuery form plugin has an option beforeSubmit like beforeSend...
beforeSubmit: function() {
return validate();
}
validate() function should return a true to continue or a false to stop execution.