PDA

View Full Version : Only FF can do Combobox getValue() ? (with hiddenName)



Aero
18 Dec 2010, 4:15 PM
Hi,

Really confusing about this one. I have searched the forum and every solution concerning sending/getting valuefield instead of displayfied etc is based on setting a hiddenName (not the same as the id). But i am not able to get any Value on Select event for my combobox..at all.



xtype: 'combo',
id:'year',
fieldLabel: 'Select Type',
anchor: '20%',
store: new Ext.data.SimpleStore({
fields: ['my_id','name'],
data :
[

['01','Admin'],
['02','User']
]
}),
typeAhead: true,
displayField: 'name',
valueField:'my_id',
hiddenName: 'comboUser',
forceSelection: true,
selectOnFocus:true,
triggerAction: 'all',
emptyText:'Select a User:',
mode : 'local',
listeners:{

select:function(combo,value){
year=Ext.getCmp('year').getValue();
Ext.Msg.show({
title:'Success'
,msg:year
,modal:true
,icon:Ext.Msg.WARNING
,buttons:Ext.Msg.OK
});

}



Works in FF.Any ideas ?

Thanks

Aero
19 Dec 2010, 5:11 AM
it now works.



listeners:{

select:function(combo,value,i){
year=combo.getValue();



}