extjs4 - EXTJS 4: Selective Ajax Request Aborting -


in application have many ajax request executes every , then. have 1 executes settimeout user interaction. problem user interaction part.

the scenario when user sets parameter , clicks button executes ajax request. if makes mistake parameter user adjust , execute again ajax request, previous request still on going.

i want abort previous request without using abortall() because said before there other request should not interrupted. selecting request abort. how do that? please help.

there property on ext.ajax autoabort : boolean

whether new request should abort pending requests.

defaults to: false

available since: 1.1.0

set prop true on ajax sent user, not interfere setinterval ajax's. also, make sure have client side , server side validation, bad params avoided. solving bad params on client side quicker, cheaper , user friendly thing let user submit falsy data!

ext.ajax.request({     url: '/echo/json/',     params: {         id: 1     },     autoabort : true,      success: function(response){                   //do     },     failure:function(response){          //do     } }); 

here example on fiddle!


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -