I am using a set of radio buttons in my asp.net (using C#) application. On click of the submit button i need to confirm whether the radio buttons have been checked using javascript. i am trying to take the value using the following line of code.
if (document.getEl ementById("rbtn list_Q1").value == "")
{
alert("Please choose an option for Question no:1");
}
but the value remains undefined. How do i validate for unchecked radio buttons???
if (document.getEl ementById("rbtn list_Q1").value == "")
{
alert("Please choose an option for Question no:1");
}
but the value remains undefined. How do i validate for unchecked radio buttons???
Comment