Thursday 26 September 2013

Extjs, how to implement delay

In order to use delay funtionality in extjs , you must create Ext.util.DelayedTask object and use its delay method which takes span of time to be delayed in miliseconds, i.e.

Following is an exmple of using delay functionality in extjs:

var task = new Ext.util.DelayedTask(function(){
    alert(Ext.getDom('myInputField').value.length);
});

Ext.get('myInputField').on('keypress', function(){
    task.delay(500);
});

No comments:

Post a Comment