himalpatel
7 Sep 2011, 5:19 AM
Hello,
I am using ExtJS 4.
I want to register blur, focus listeneres on a text box. i can do it easily when there is no parameter to the function that I am calling.
Here is the code snap
pnl = Ext.create('Ext.form.Panel', {
title: fldTitle,
labelWidth: 75,
frame: false,
bodyStyle: 'padding:5px 5px 0',
renderTo: Ext.getBody(),
layout: 'auto',
defaults: {
bodyPadding: 4
},
items: [{
xtype: 'fieldset',
autoScroll: true,
flex: 1,
columnWidth: 0.5,
defaultType: 'textfield',
defaults: { anchor: '100%' },
layout: 'anchor',
items: _fields
}],
listeners: alertme
});
function alertme()
{
alert('called');
}
It works fine but when i have some parameter say like
function alertme(msg)
{
alert(msg);
}
i cannot find any way of passing the message.
Thanks you,
Himal
I am using ExtJS 4.
I want to register blur, focus listeneres on a text box. i can do it easily when there is no parameter to the function that I am calling.
Here is the code snap
pnl = Ext.create('Ext.form.Panel', {
title: fldTitle,
labelWidth: 75,
frame: false,
bodyStyle: 'padding:5px 5px 0',
renderTo: Ext.getBody(),
layout: 'auto',
defaults: {
bodyPadding: 4
},
items: [{
xtype: 'fieldset',
autoScroll: true,
flex: 1,
columnWidth: 0.5,
defaultType: 'textfield',
defaults: { anchor: '100%' },
layout: 'anchor',
items: _fields
}],
listeners: alertme
});
function alertme()
{
alert('called');
}
It works fine but when i have some parameter say like
function alertme(msg)
{
alert(msg);
}
i cannot find any way of passing the message.
Thanks you,
Himal