In short the question is:
jQuery.ajax({
url: some_url,
success: function(){
alert('success1');
},
error: function(){
alert('error1');
}
});
jQuery.ajax({
url: some_url,
success: function(){
alert('success2');
},
error: function(){
alert('error2');
}
});
jQuery.ajax({
url: some_url,
success: function(){
alert('success3');
},
error: function(){
alert('error3');
}
});
Will these always result in:
alert('success1');
alert('success2');
alert('success3');
Or can the output be like:
alert('success2');
alert('success3');
alert('success1');
Shouldn't I run abort() on previous AJAX requests if I want the last one's output to be displayed to the user only? I mean I don't mind them seeing success1 and success2 messages as long as success3 will be always the last one.