Example:
function validate_1(val){
var msg = "";
var chk = false;
if(val == 6) {
$("[name='zzz']").each(function() {
//alert($(this).is(':checked'));
if($(this).is(':checked')) chk = true;
});
if(!chk) msg = msg + "zzz is required\n";
}
if(val == 7) {
$("[name='zzz']").each(function() {
//alert($(this).is(':checked'));
if($(this).is(':checked')) chk = true;
});
if(!chk) msg = msg + "zzz is required\n";
}
if(msg != ""){
alert(msg);
return false;
} else {
return true;
}
}
0 comments :
Post a Comment