Reputation: 295
Everyone, can anyone tell me how to monitor failure in jquery ajax call. We have 'success:' for success but is there is anyway to detect failure event.
Thanks
Upvotes: 0
Views: 61
Reputation: 382909
There is error
callback for that:
$.ajax({
........,
........,
success: function(){alert('success !');},
error:function(){alert('failed!');},
});
See the DOCS for more information :)
Upvotes: 3