var g = document.formname;
var checkSelected=0;
for(var i=0; i < g.elements.length; i++) {
if(g.elements[i].name && g.elements[i].name.substr(0, 8) == "category" && g.elements[i].checked == true && g.elements[i].name != "categoryname") {
checkSelected = 1;
break;
}
}
if( checkSelected == 0 ){
alert("");
g.elements[i].focus();
return false;
}
No comments:
Post a Comment