Need help on combo box selection
By wktd | March 16, 2010
Sorry about the rookie question. I have a combo box, after I make a selection (e.g. use the combo box sample, I select Alabama state), I need to check something on the selection.
I am not sure how I should do it. Should I add a 'blur' event and its handle on the combo box so that once selection is made, blur handler gets called?
Thanks for any suggestions.
George
Please see the documentation for ComboBox (http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox). The 'select' event should be what you are looking for. eg:
var cb = new Ext.form.ComboBox({
// all of your config options
listeners:{
scope: yourScope,
'select': yourFunction
}
});
Alternatively, you can assign events after the object is created:
var cb = new Ext.form.ComboBox(yourOptions);
cb.on('select', yourFunction, yourScope);
Hope this helps-
Mark
#If you have any other info about this subject , Please add it free.# |
Topics: enart.zjbr.com | edit