I already succeeded in making alert if the box is left empty or not filled in. All of my codes are working except for the GENDER and GRADE. For GENDER they have to tick to select. For Grade they have to select on the drop down menus. Here are my codes.
function validation()
{
if(document.form1.first_name.value=="")
{
alert("Please enter your first name.");
document.form1.first_name.focus();
return false;
}
if(document.form1.last_name.value=="")
{
alert("Please enter your last name.");
document.form1.last_name.focus();
return false;
}
if(document.form1.gender.value=="")
{
alert("Please select your gender.");
document.form1.gender.focus();
return false;
}
if(document.form1.grade.value=="")
{
alert("Please select your grade.");
document.form1.grade.focus();
return false;
}
First name, last name and others are working except for Grades and Gender. Please help me