So I am trying find out if the property "failure" is correct for the following AJAX call. I am finding it all over the place in a new web application I am working on and cannot seem to find it being used in JQuery API docs:
$.ajax({
type: "POST",
url: '/AdminTools/HydrateSelectFromDistrict/',
data: queryStr,
dataType: 'html',
beforeSend: OnBegin,
success: OnDistrictChangeSuccess,
failure: OnFailure,
timeout: 5000
});
Shouldn't that property be "error", not "failure"? Never seen the property "failure" used in an AJAX callback
I think you're right. It should be "error". I've never seen "failure" either and it isn't in the documentation. I also did not find it in the jQuery code itself.
http://api.jquery.com/jquery.ajax/