I am new with javascript. I thought the folowing would work but it does not. The problem seems to be with the date validation section. Any help is appreciated.
Code:
<script language="JavaScript" type="text/JavaScript">
function validate() {
if (document.mainform.confname.value=="" )
{
alert("Please enter your Conference Name");
event.returnValue=false;
}
if (Date.parse(document.mainform.opendate.value) <= Date.parse(document.mainform.closedate.value)) {
alert("Registration End Date must occur after the Registraton Start date.");
event.returnValue=false;
)
}
</SCRIPT>
Code:
<form action="setup.cfm" method="post" onSubmit="validate();" name= "mainform" id= "mainform">