PDA

View Full Version : Fieldset different works between FF and IE



Chap
8 Jul 2010, 11:36 PM
Hi guys,

I extend a fieldset using checkboxToggle. but the works situation is quite different between FF and IE of enable() and disable(). See the detail:

Extend the fieldSet:

MyFieldSet = Ext.extend(Ext.form.FieldSet, {
constructor: function(config) {
MyFieldSet .superclass.constructor.call(this, config);
this.addEvents('check');
}
, onCheckClick: function(){
this[this.checkbox.dom.checked ? 'enable' : 'disable']();
this.fireEvent('check', this, this.checkbox.dom.checked);
}
, getCheckValue: function() {
return this.checkbox.dom.checked ? true : false;
}
, setChecked: function(checked) {
this.checkbox.dom.checked = checked;
this.onCheckClick();
}
});

The way to use:

var checkFS = new MyFieldSet ({
title: 'check fieldset'
, style: 'margin-left:10px; margin-top:10px; margin-right:30px;'
, autoHeight: true
, checkboxToggle: true
, items: [XXX, XXX, XXX]
});

The attachment file is the detail works situation. Thanks for someone's help! :)