Help with a script to deline members of a certain age
Hi folks,
I have an entry form which has a date of birth input requirement and the format of input is YYYYMMDD i.e 19920819 being born on the 19 August 1992.
I do however want to limit 1992 models from entering information and should they submit the form then a pop up should appear saying sorry you are too old to enter these events?
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>entryform</title>
<meta name="KEYWORDS" content="GAUTENG,NORTH">
<meta http-equiv="Page-Enter" content="revealTrans(Duration=1,Transition=2)">
<meta name="GENERATOR" content="Created by BlueVoda">
<style type="text/css">
div#container
{
width: 752px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
}
</style>
<script language="JavaScript" type="text/javascript">
<!--
function Validateentryform(theForm)
{
if (theForm.Editbox1.value == "")
{
alert("Please enter your NAME");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox1.value.length < 3)
{
alert("Please enter your NAME");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox1.value.length > 35)
{
alert("Please enter your NAME");
theForm.Editbox1.focus();
return false;
}
if (theForm.Editbox4.value == "")
{
alert("Please enter a value for the \"Please enter your SURNAME\" field.");
theForm.Editbox4.focus();
return false;
}
if (theForm.Editbox4.value.length < 3)
{
alert("Please enter at least 3 characters in the \"Please enter your SURNAME\" field.");
theForm.Editbox4.focus();
return false;
}
if (theForm.Editbox4.value.length > 35)
{
alert("Please enter at most 35 characters in the \"Please enter your SURNAME\" field.");
theForm.Editbox4.focus();
return false;
}
var strFilter = /^[-+]?\d*\,?\d*$/;
var chkVal = theForm.Editbox3.value;
if (!strFilter.test(chkVal))
{
alert("Date of Birth ? ? (YYYYMMDD)");
theForm.Editbox3.focus();
return false;
}
if (theForm.Editbox3.value == "")
{
alert("Date of Birth ? ? (YYYYMMDD)");
theForm.Editbox3.focus();
return false;
}
var strFilter = /^[-+]?\d*\.?\d*$/;
var chkVal = theForm.Editbox5.value;
if (!strFilter.test(chkVal))
{
alert("Please enter your CELL NUMBER (i.e 083 . . . . . . ) no spaces");
theForm.Editbox5.focus();
return false;
}
if (theForm.Editbox5.value == "")
{
alert("Please enter your CELL NUMBER (i.e 083 . . . . . . ) no spaces");
theForm.Editbox5.focus();
return false;
}
if (theForm.Editbox5.value.length < 10)
{
alert("Please enter your CELL NUMBER (i.e 083 . . . . . . ) no spaces");
theForm.Editbox5.focus();
return false;