Regarding RadioButtonList Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

While using the RadioButtonList control, that I populated in the runtime, I
am not able to get the selected item in the javascript while referring

document.Form.RadioButtonList.value.

What is the solution.
The DropDownList control is able to refer in javascript like
document.Form.DropDownList.value

Please instruct me.
=====================Suresh
 
Hi,

please use following javascript to get selected radio button value
function GetSelectedRadioOption(rbList)
{
var iIndex=0;
while(document.getElementById(rbList + '_' + iIndex))
{
if (document.getElementById(rbList + '_' + iIndex).checked)
{
var selected = document.getElementById(rbList + '_' + iIndex).value;
return selected;
}
iIndex=iIndex+1;
}
}
 
Back
Top