javascript - ajax error handler when internet connection lost -


i've ajax calls in add handler in case of error. found "error" handler doesn't work i.e. when internet connection lost. there second handler these cases?

$.ajax({       type: "get",       url: "dosomethink.php",       success: function (data) {         $('#abc').html(data);       },       error: function (xhr, ajaxoptions, thrownerror) {         alert(xhr.status);         alert(thrownerror);       }     }); 

what if using timeout , error method

$.ajax({type: 'get',url: '/controller/action',timeout: 15000,success: function(data) {},error: function(xmlhttprequest, textstatus,errorthrown) {}}); 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -