I have the following:
$.ajax({ cache: false,
url: "/Admin/Contents/GetData",
data: { accountID: AccountID },
success: function (data) {
$('#CityID').html(data);
},
error: function (ajaxContext) {
alert(ajaxContext.responseText)
}
});
When I lose my Internet connection, an error is raised, but I do not see anything in the responseText.
Is there a way to find out the various errors based on the status information in the returned ajaxContent? I would really like for me to be able to post a message stating that "Internet connection is lost", and another message if there is any other problem.
Alan2 source
share