PDA

View Full Version : focus troubles



loveforvdubs
28 Sep 2010, 12:16 PM
I am trying to have a field of my form selected when it is shown in a new window. I used the following code. It works for about a second or two and then looses focus. I am not sure what it works for a short while and then no longer. Any help would be greatly appreciated.


var win = new Ext.Window({
title:'Enter New PO',
width:600,
height:500,
autoScroll:true,
closable:true,
modal:true,
layout:'fit',
items: form = new AsiInventory.poForm({

}),
listeners:{
show:function(){
//alert('called');
form.get('invPartNumber').focus(true);
}
}
});

win.show();