how callback a function on 404 on JSON ajax request with Jquery?
- by shingara
I want made an Ajax request with response on JSON. So I made this Ajax request :
$.ajax({
url: 'http://my_url',
dataType: "json",
success: function(data){
alert('success');
},
error: function(data){
alert('error');
},
complete: function(data) {
alert('complete')
}})
This code works good but when…