PDA

View Full Version : Help in ComboBox (this is driving me crazy)



franzisk
22 Aug 2007, 3:27 AM
Problem:
When I click on the arrow to show the List it shows the list but Up there on the left-top corner of the window, and when I select one of them the selected item does not appear selected in the list.

Can anyone please point me what is wrong with this code.
What's the matter with this ComboBox? (I have Ext 1.1)

[CODE]if(!document.getElementById('dlg-form-text-delete')){
dlg = document.createElement("div");
dlg.id = 'dlg-form-text-delete';
document.body.appendChild(dlg);
}

if(!dlgInputDelete) {
dlgInputDelete = new Ext.BasicDialog('dlg-form-text-delete', {
autoCreate: true,
width: 415,
height: 240,
modal: true,
closable:false,
resizable:false,
draggable:true,
collapsible:false,
buttonAlign:'center',
title:'Motivo da Exclus

fay
22 Aug 2007, 4:00 AM
Your combo is using the same name for id and hiddenName. Change it to something like:

id: 'reasonid',

and it works fine. Also, noticed your displayField and valueField are the same.

EDIT: Just for completeness, when hiddenName is specified a hidden form field is added - you'd already used the same name in id. See http://extjs.com/deploy/ext/docs/output/Ext.form.ComboBox.html#config-hiddenName

franzisk
22 Aug 2007, 4:06 AM
Thank you very much my friend, yes yes yes, it worked, re the label and value being the same, yes I need them being the same, thank you veyr much, How silly me =D>

access9
18 Sep 2007, 11:54 AM
I had the same problem. Just when I thought I wouldn't find the answer I found this thread. Thanks!