Validate ASP.Net RadioButtonList using JavaScript on Button Click

Last Reply on Dec 28, 2012 03:01 AM By Mudassar

Posted on Dec 28, 2012 03:00 AM
function ValidateEmpType() {
            var radioButtonlist = document.getElementsByName("<%=rbtnTypeList.ClientID%>");
            for (var x = 0; x < radioButtonlist.length; x++) {
                if (radioButtonlist[x].checked) {                    return "";
                }                else {
                    return ("Please Select Employee's category"+"\n");
                }            }        }
used abv code over button onClientClick ... but not working