Problem while using Ajax Event i.e ajaxError
HI
i have just used Jquery Ajax events i.e. ajaxStart, ajaxError, ajaxSuccess
The ajaxStart and ajaxSuccess works fine, but my program cannot trigger ajaxError if any mysql error occurs.
On my registration form i have included mysql connection file, but for testing purposes i have entered the wrong password for DB.
In that same, when i click on submit button, it cannot trigger ajaxError event.
Do tell me how can i use it.
here is my code
-
submitHandler: function()
{
// When Ajax Request Send //
$("#dialog2").ajaxStart(function(){
$('#dialog2').html("<h2>Please Wait...<br>Registration is in Process</h2>")
});
//When Ajax returns Errors
$("#dialog2").ajaxError(function(event, request, settings){
$('#dialog2').html("<li>Error requesting page " + settings.url + "</li>");
});
//Display it when ajax requests completes successfully
$("#dialog2").ajaxSuccess(function(evt, request, settings){
$('#dialog2').html("<h2>Registration Completed Successfully!</h2>")
});
}
waiting for suggestions
Eshban