2

I have 3 ajax functions that I use to get data from the database. What I want is to repeat each one that encountered any errors.

Basically, this is what I have:

getDevices(); //1st ajax function
getLocs(); //2nd ajax function
getStats(); //3rd ajax function
$(document).ajaxStop(function(event){
    //For each ajax that finished
    //if ajax.status = error, do it again
});

Any suggestions? Thank you.

MagisterMundus
  • 335
  • 4
  • 18
  • possible duplicate of [What's the best way to retry an AJAX request on failure using jQuery?](http://stackoverflow.com/questions/10024469/whats-the-best-way-to-retry-an-ajax-request-on-failure-using-jquery) – urbz Aug 12 '14 at 14:29

0 Answers0