I use ajaxSubmit to submit my form and would like to check if the event returns an error.
var options = { beforeSubmit: showRequest, // pre-submit callback success: showResponse, // post-submit callback error: printError, url: '../validation.php' }; $('#form1').submit(function () { $(this).ajaxSubmit(options); return false; });
In other words, I need to know how to simulate an error event so that I can test the printError function.
thanks
jquery
q0987
source share