PDA

View Full Version : combo box standard values



Drake
7 Sep 2010, 12:57 AM
Hello,
Having a form including a textbox and two combo boxes leads to the following behavior:
I need to set some standard values for the combo boxes. The only way I found to do this easily was using the dom options:


Ext.get('combo').dom.setValue("standardValue");
Ext.get('combo').dom.select(0,false);

When I reload the page, the standard values are presented in the boxes and the focus is laid to the first one.
As soon as I click somewhere on the page, it looses its focus and the values disappear.

Is there any trick to overcome this problem easily?

Condor
7 Sep 2010, 1:09 AM
Ext.getCmp('combo').setValue('standardValue');

Drake
7 Sep 2010, 4:04 AM
Thanks a lot! Last time I tried it didn't transfer the value. But now it works! Thanks again!