Hey ppl,
I have a form with the start date and end date fields...
I want to check if bothe fields are filled and also to check if the start date is earlier than the end date...
<form id="form1" name="form1" method="post" action="get2.php" onSubmit="return validateform(this)">
Checking code...
<script language="javascript">
<!--
function validateform(form1)
{
if(form1.date5.value=='0000-00-00')
{
alert('Select the Start Date');
return false;
}
if(form1.date6.value=='0000-00-00')
{
alert('Select the End Date');
return false;
}
return true;
}
This code checks if the fields are filled... but i don't knw how to make sure if the start date is earlier than end date...