Use Following code to Validate radio button on your form: function checkRadio (frmName, rbGroupName) { var radios = document[frmName].elements[rbGroupName]; for (var i=0; i if (radios[i].checked) { return true; } } return false; } To call this function for validation use the following code:- ------------------ if (!checkRadio("frm1","rdbgender")) alert("You didnt select any fruits"); else alert("You selected a fruit"); Say Namasthey to Javascript!!!. Post your comments..
Feel the heartbeats of Arts, Science and Technology