javascript - display data in popup after update -


i try update data in popup , display it

 updatecart: function() {                     ajax_block('#basket-form');                     var ajaxended = ajax_load('#basket-form', '<?=$arresult['ajax_call_id']?>', $('#basket-form').serializearray());                     $.when(ajaxended).done(function() {                         bis.updatetopcartfromcart.init();                         bis.cartpopup.init('#popup-cart-wrapper');                         bis.updatetopcart.init();                     })                 } 

here updatetopcartfromcart function:

bis.updatetopcart = {             init: function() {                 var container = $('#popup-cart-wrapper');                 var defupdatedtopcart = new $.deferred();                  ajax_block('.top-cart');                 var ajaxended = ajax_load('.top-cart', '<?=$arresult['ajax_call_id']?>', $('.top-cart-form').serializearray());                 $.when(ajaxended).done(function() {                     defupdatedtopcart.resolve();                     container.html($('.popup')).fadein('fast');                     $.fancybox({                         content: container,                         afterload: function() {                             container.show();                         }                     });                  });                 return defupdatedtopcart;             }         } 

cartpopup function:

bis.cartpopup = {     init: function(container) {         var cartpopuplink = $('.buttcart');         var self = this;    } } 

and updatetopcart function:

bis.updatetopcartfromcart = {     init: function() {         ajax_block('.top-cart');         ajax_load('.top-cart', '<?=$arresult['ajax_call_id']?>', $('.top-cart-form').serializearray());     } } 

the problem is, when try update items, it's display 4 times. missing?


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -