title: ExtJs 4: Remote Combobox - Abort Previous Request
body: <p>Like the title says, I would like to abort the previous ajax request. The combobox request through ajax whenever a user types in letters(or numbers) it request data, like I said through ajax, then returns the data back to the combobox.</p>
  
  <p>My problem is that the ajax request will pile up whenever I put a user inputs in the field.</p>
  
  <p>What I want to do is to abort first the previous request then proceed to the present request. I tried this code:</p>
  
  <pre><code>  comboObj.onTypeAhead = Ext.Function.createInterceptor(comboObj.onTypeAhead, function() {
       Ext.Ajax.abort(); //aborts the last Ajax request
       return true; //runs the onTypeAhead function
    });
  </code></pre>
  
  <p>That didnt work, then tried this:</p>
  
  <pre><code>  ......
    listeners: {
          beforequery: function(evt){
             Ext.Ajax.abortAll(); //cancel any previous requests
             return true;
          }
       }
  </code></pre>
  
  <p>That did not work for me either because I have a timer that also uses ajax request, which will also be cancelled if the listener is executed.</p>
  
  <p>How do I do this?</p>