I have a FieldSet which looks like this:
PHP Code:
var myFieldSet = new Ext.form.FieldSet;
myFieldSet.title = 'Title goes here';
myFieldSet.defaults = {
labelWidth : '35%',
listeners : {
el : {
click : function(ctl) {alert('hello')}
},
delegate : "input"
}
};
It works. But I want to add a click listener later per code. It should look like this:
PHP Code:
var myFieldSet = new Ext.form.FieldSet;
myFieldSet.title = 'Title goes here';
myFieldSet.defaults = {
labelWidth : '35%'
};
....more code....
myFieldSet.defaults.addListener('click', function() {
alert('hello');
});
This dosn't work. The event isn't fired. Please help me. Thanks!