PDA

View Full Version : [ask] simple combobox -- nothing display



mtamma
21 May 2013, 2:14 AM
Hi all,

could anyone tell me what wrong with my code? (it displayed nothing)



<script>
Ext.onReady(function(){
var my_values = [
['one'],
['two'],
['three']
];
var cb = new Ext.form.ComboBox({
fieldLabel: 'Number',
hiddenName: 'number',
store: new Ext.data.SimpleStore({
fields: ['number'],
data: my_values
}),
displayField: 'number',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Choose number...',
selectOnFocus: true
});
});
</script>

mitchellsimoens
24 May 2013, 4:59 AM
You are creating the component but not telling it to render. If you want to just render it to the body, set the renderTo config to Ext.getBody()

mtamma
20 Jun 2013, 6:31 PM
Thanks mitchellsimoens