javascript - JQuery append() doesn't update container upon ajax success -
i have ajax call:
$.ajax({ url: "addstandardleistungenselected", data: { services: services1 }, datatype: "html", traditional: true, success: function (data) { $('#standartleistungen_list_selected').empty().append(data); $.ajax({ url: "getstandardleistungennotselected", data: { services: services1 }, datatype: "html", traditional: true, success: function (data2) { $('#standartleistungen_list_notselected').empty().append(data2); }, error: function (jqxhr, textstatus, errorthrown) { alert("something went wrong"); console.log(textstatus, errorthrown); } }); }, error: function (jqxhr, textstatus, errorthrown) { alert("something went wrong"); console.log(textstatus, errorthrown); } });
that supposed update 2 containers upon receiving 2 responses mvc controller actionmethods, receive responses, , succeed in updating other way around:
$.ajax({ url: "addstandardleistungennotselected", data: { services: services }, datatype: "html", traditional: true, success: function (data) { $('#standartleistungen_list_notselected').empty().append(data); $.ajax({ url: "getstandardleistungenselected", data: { services: services }, datatype: "html", traditional: true, success: function (data2) { $('#standardleistungen_list_selected').empty().append(data2); }, error: function (jqxhr, textstatus, errorthrown) { alert("something went wrong"); console.log(textstatus, errorthrown); } }); }, error: function (jqxhr, textstatus, errorthrown) { alert("something went wrong"); console.log(textstatus, errorthrown); } });
i have checked every damn possible thing think of , thing still doesn't want update !!!
please help me out!!! :(
javascript jquery ajax frontend
No comments:
Post a Comment