asp.net - Lost connection does not return error with jQuery AJAX on live site but on dev? -


i using following code post data asp.net 2.0 site asp.net 2.0 web service post data server:

$.ajax({     type: "post",     url: "synchronisecustomers.asmx/synchronisecustomers",     data: json.stringify(customerobj),     contenttype: "application/json; charset=utf-8",     datatype: "json",     error: function (xhr, status) {         // if not successfull     },     success: function (msg) {         deletecustomer(customer.id);     } }); 

i have javascript function check if have connection or not, if have run synchronisation (pulling data web kit browser local database):

function checkconnection() {     var = new image();     i.onload = synchronise;     i.onerror = fail;     i.src = 'http://myurl.com/ping.gif?d=' + escape(date());     settimeout("checkconnection()", 60000); // execute every minute } 

thing is, if run locally , drop internet connection web service returns 500 error (like want do) , deletecustomer(customer.id); not called. however, on live site if drop connection web service not return error , deletecustomer(customer.id); called if don't have connection internet (customer gets deleted local database without being posted web server).

what's reason this? please let me know if need more code.

thanks in advance.

you didn't wait minute after dropping connection.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -