i am passing radio button control id and getting radio button name. Using that i'm checking radio button[0] is checked. Its working good in IE 9 but not in IE Edge.
ABC.cshtml
Yes
@html.radiobuttonfor(m=>m.singlename,true,new{id="singleid",@onclick=bothchecked()})
No
@html.radiobuttonfor(m=>m.singlename,false,new{id="singleid_no",@onclick=bothchecked() })
ABC.js file
function bothchecked()
{
controls["singleid"];
checksingle(controls);
return false;
break;
}
function checksingle(controls)
{
var radio=document.getElementsByName(controls);
if(radio[0].checked)
{
}
else
{
enablecontrols(controls);
}
}
i'm getting error in this line if(radio[0].checked) where radio[0] is null or undefined.how to resolve it in IE Edge.