I have a radiobuttonlist in my web application I have an event onclick for this it works fine in IE but not in some other browsers. The sample code is as follows
<asp:RadioButtonList ID="rbgThreadStatus" runat="server" RepeatDirection="Horizontal"
OnSelectedIndexChanged="rbgThreadStatus_SelectedIndexChanged" onclick="return rdblst_onClick();" AutoPostBack="True">
<asp:ListItem Selected="True" Value="0">Alpha</asp:ListItem>
<asp:ListItem Value="1">Bravo</asp:ListItem>
<asp:ListItem Value="2">Charlie</asp:ListItem>
<asp:ListItem Value="3">Delta Tickets</asp:ListItem>
<asp:ListItem Value="4">Echo</asp:ListItem>
</asp:RadioButtonList> <input type="hidden" value="0" id="hdnValue" runat="server" />
Following is the Javascript
function rdblst_onClick()
{
var hdnValue = document.getElementById('ctl00_ctl00_MainMaster_ContentPlaceHolder2_hdnValue');
var length = document.getElementById('ctl00_ctl00_MainMaster_ContentPlaceHolder2_rbgThreadStatus').cells.length;
for (var i = 0; i < length; i++)
{
if (document.getElementById('ctl00_ctl00_MainMaster_ContentPlaceHolder2_rbgThreadStatus_' + i.toString()).checked)
{
if (hdnValue.value != document.getElementById('ctl00_ctl00_MainMaster_ContentPlaceHolder2_rbgThreadStatus_' + i.toString()).value)
{
hdnValue.value = document.getElementById('ctl00_ctl00_MainMaster_ContentPlaceHolder2_rbgThreadStatus_' + i.toString()).value;
}
}
}
}