Aborting chains of Ajax calls in Javascript -
sometimes when user triggers same event more once, same ajax call made multiple times. pretty straight forward setup simple object keep track of identical calls , abort oldest ones, how can deal when there chains of calls made?
what mean chains: lets user clicks button , triggers ajax_a(...). @ later point ajax_b(...) executed. @ point user clicks same button again invokes same chain again.
is there practical way of aborting whole chain (both ajax_a(...) , ajax_b(...))?
our current solution quite obtrusive sections make ajax call part of chain.
you might want have @ new jquery 1.5 deferreds: http://www.erichynds.com/jquery/using-deferreds-in-jquery/
Comments
Post a Comment