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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -