PDA

View Full Version : Using handler with radio button



mohyt
4 Mar 2010, 10:51 AM
Hi all,
i m begginer...
Ext.onReady(function(){

var text_field={ xtype:'fieldset',
autoHeight:true,
items:[{ xtype:'radiogroup',
fieldLabel:'DataType',
items:[
{boxLabel:'Integer',name:'rb-text',inputValue:1,checked:true,},
{boxLabel:'String',name:'rb-text',inputValue:2},
{boxLabel:'Double',name:'rb-text',inputValue:3,handler:function{
}
}}
]
}]
};
var range={

xtype: 'fieldset',
autoHeight: true,
items: [{
xtype: 'textfield',
name: 'From',
fieldLabel: 'Range',
anchor: '95%'
},{
xtype: 'textfield',
name: 'to',
//fieldLabel: 'Range',
anchor: '95%'
},{
xtype: 'radiogroup',
fieldLabel: 'IsEmpty',
items: [
{boxLabel: 'True', name: 'rb-empty', inputValue: 1},
{boxLabel: 'False', name: 'rb-empty', inputValue: 2, checked: true}
]
}]
};


var p = new Ext.FormPanel({
title: 'TextField',
collapsible:true,
collapsed:true,
renderTo: 'panel-basic',
width:400,
frame:true,
items:[text_field ,range]
});
});

i hav to add more items in the Panel ,only when text_field radio buttons will selected.
so what can i do.. in handler function of radio button