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
Post a Comment