javascript - ajax been skipped when called again? -


ok, ajax follow:

      $.ajax({             url: "checkout/getcartfromclient/",             contenttype: 'application/json; charset=utf-8',             datatype: 'json',             type: "post",             data: json.stringify(list), 

which send cart items localstorage server, when user edit items, manage update localstorage correctly , when sending again server, ajax called skipped , server don't have updated cart version !?

the issue ajax call work once, second, third time been skipped !?

is ajax call under separate function, if not put in function like:

function updatecart(list){ $.ajax({         url: "checkout/getcartfromclient/",         contenttype: 'application/json; charset=utf-8',         datatype: 'json',         type: "post",         data: json.stringify(list), success: function(response){ //do stuff }, error:function(err){ //get error } 

})

debugging: -- check data in list items

hope helps!


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -