what is the opposite of -> success: function(data)
$.ajax({
type: "POST",
cache: false,
url: "/p.php",
data: info,
success: function(data){
I want to check if it is not success instead of if it is success...
what is the opposite of -> success: function(data)
$.ajax({
type: "POST",
cache: false,
url: "/p.php",
data: info,
success: function(data){
I want to check if it is not success instead of if it is success...
You catch success situation with success function and there is also error function. Please see the documentation http://api.jquery.com/jquery.ajax/
And please see this for detailed xhr catch mechanizm
$.ajax({
type: "POST",
cache: false,
url: "/p.php",
data: info,
success: function(data){
//do something
},
error: function(jqXHR, textStatus, errorThrown){
console.log(errorThrown);
}