This is the gut of my ajax call.
function ajax(path, requestData, successCallBack, errorCallBack) {
return $.ajax({
error: function(xhr, textStatus, errorThrown)
ç(xhr, textStatus, errorThrown);
},
success: function(json){
successCallBack(json);
}
});
}
When there is an ajax call going on and the user clicks on a link on the page, my errorCallBack is invoked. The user navigating away would cause the ajax call to be killed. When there is an error on the server, my errorCallBack callback is also invoked.
Is there a way to differentiate the two?
Thanks!