PDA

View Full Version : radio buttons in a message box



nawin.muttineni@gmail.com
22 Nov 2012, 2:31 AM
Hi,
I am able insert radio buttons, but i want to get the value of radio button that is checked.
I tried with the following code.
I got the error in "Ext.Msg.getDialog().body" statement.
Please help me get the checked value...

Ext.Msg.show({
title: 'Confirm?',
msg: 'Please choose The Period.<br/><br/>' +
'<input type="radio" id="rb1" name="mb-options" value="lastThreeMonths" />' +
'<label for="rb1">' +
'<b>Last 3 Months</b>' +
'</label><br/><br/>' +
'<input type="radio" id="rb2" name="mb-options" value="lastSixMonths" />' +
'<label for="rb2">' +
'<b>Last 6 Months</b>' +
'</label><br/><br/>'+
'<input type="radio" id="rb3" name="mb-options" value="thisYear" />' +
'<label for="rb3">' +
'<b>This Year</b>' +
'</label><br/><br/>'+
'<input type="radio" id="rb4" name="mb-options" value="lastYear" />' +
'<label for="rb4">' +
'<b>Last Year</b>' +
'</label><br/><br/>',
icon: Ext.MessageBox.QUESTION,
buttons: Ext.Msg.OKCANCEL,
fn: function(btn) {
if (btn == 'ok') {
var body = Ext.Msg.getDialog().body;

}
}
});

mitchellsimoens
24 Nov 2012, 6:25 AM
What is the getDialog method?