Validating via Javascript in Maintainers Source Code
<script type="text/javascript">
function validate_form ( )
//Check two dates, DATEORD & DATEEXP in Maintenance application
{
valid = true;
if (document.FORM_M00230.STARTDATE[0].value == 0 && document.FORM_M00230.ENDDATE[0].value == 0)
{
alert ( "You have not entered any dates." );
valid = false;
}else if (document.FORM_M00230.STARTDATE[0].value == 0)
{
alert ( "You must enter a starting date." );
valid = false;
}else if (document.FORM_M00230.ENDDATE[0].value == 0)
{
alert ( "You must enter an ending date." );
valid = false;
}
else if ( document.FORM_M00230.STARTDATE[0].value > document.FORM_M00230.ENDDATE[0].value)
{
alert ( "Start Date is greater than End Date." );
valid = false;
}
return valid;
}
</script>