hi guys
iam having one Date of Birth TextBox,if we enter date of birth , we have to give gurdian/Parent name in case of Minors .
while doing validation if the date of birth is less than 18 then only gurdian/Parent name field is mandatory field
other wise it is not mandatory field .
how to do that .
thanks in advance .
Dhanunjay JajimogglaPosted Aug 25, 2014, 10:57 AM
Do like this,
if(document.getElementById("Age_txtbox_id").value < 18){
if(document.getElementById("Dob_txtbox_id").value == ""){
alert("Please Enter BOD.");
}
}
else
{
//here no need of else part
// If you want,do some thing here
}