PDA

View Full Version : Combobox setDisable() problem in IE



ess-ua
21 Jul 2008, 3:01 AM
Hi, all.

I need help.

I use comboboxes in the panel with layout 'table'.

In Internet Explorer when I call function setDisabled(true) for combobox it disappears on panel,

when setDisabled(false) combobox appear on the panel again.


But in Firefox it work correctly.


For example:

companyName = new Ext.form.ComboBox({
store: companyNameStore,

listWidth: 200,
labelStyle: 'width:100px; padding-left:10px;',

valueField: 'id',
width: 200,
displayField: 'name',
emptyText: 'Select Company...',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
selectOnFocus: true,
forceSelection: true


});

setCompanyButton=new Ext.Button({
text:'Set',
disabled:true,
cls:'po_button',
handler: function()
{
warehouse.setDisabled(false);
supplierPurchase.setDisabled(false);
poType.setDisabled(false);
departmentPurchase.setDisabled(false);
savePurchaseOrder.setDisabled(false);


companyName.setDisabled(true);
searchButtonByParameters.setDisabled(false);
searchButtonById.setDisabled(false);
if (labelPanel.findById("label") != null) {
lab = labelPanel.findById("label");
labelPanel.remove(lab);
}


}
});

resetCompanyButton=new Ext.Button({

text:'Reset',
cls:'po_button',
handler: function()
{
productOrderStore.removeAll();
orderStore.removeAll();

companyName.setValue("");
companyName.setDisabled(false);
searchButtonByParameters.setDisabled(true);
searchButtonById.setDisabled(true);
setCompanyButton.setDisabled(true);
warehouse.setDisabled(true);

supplierPurchase.setValue("");
warehouse.setValue("");
poType.setValue("");
departmentPurchase.setValue("");
poNumber.setValue("");

warehouse.setDisabled(true);
supplierPurchase.setDisabled(true);
poType.setDisabled(true);
departmentPurchase.setDisabled(true);
savePurchaseOrder.setDisabled(true);

totalCost.setValue(0);

row=0;
while(row<storeProducts.getCount())
{
storeProducts.getAt(row).set("value", false)
row++;
}
if (labelPanel.findById("label") != null) {
lab = labelPanel.findById("label");
labelPanel.remove(lab);
}


}
});



var companyOrderPanel = new Ext.Panel({

border: false,
layout:'table',
maskDisabled : false,
layoutConfig: {
columns: 4
},
items:[{

html: '<font size="2" style="font-family:tahoma,arial,helvetica,sans-serif;">Company:</font>',
width: 90,
border:false
},
{

items:[companyName],
width: 240,
border:false
},
{

items:[setCompanyButton],
width: 65,
border:false
},
{

items:[resetCompanyButton],
width: 65,
border:false
}

]
});


var chooseOrderPanelMain = new Ext.Panel({

border: false,
layout:'table',

style:'padding-left:10px;padding-right:1px;margin-right:1px;',
layoutConfig: {
columns:2
},
items:[{
items:[companyOrderPanel],
xtype: 'fieldset',

collapsible: false,
autoHeight: true,
title: "Search by PO",


height:30,
width: 480
},{
items:[chooseOrderPanel],
xtype: 'fieldset',
style:'margin-left:10px;',
collapsible: false,
autoHeight: true,
title: "Document",


width: 750,
rowspan:2

},{
xtype: 'fieldset',

collapsible: false,
autoHeight: true,
title: "Search by PO",


height:30,
width: 480,
items:poNumberOrderPanel

},{
colspan:2,
border:false,
items:gridOrderPanel
}


],
height:290
});