Hi, I need to have two user input dates validated on a single form when the user clicks submit. At the moment I only hvae it validating one date and I’m not sure how to have it check the other, do I need some sort of a loop?
The form code is:
[code]<form name=”startDateForm” method=”post” action=”pass.jsp” onSubmit=”return ValidateForm()”>
<input name=”projectStartFromDate” type=”text” id=”projectStartFromDate”>
<input name=”projectStartToDate” type=”text” id=”projectStartToDate”>
The Validation function is:
[code]function ValidateForm(){
var dt=document.startDateForm.projectStartFromDate
if(dt.value == ”) return true;
else if(isDate(dt.value)==false){
dt.focus()
return false
}
return true
}
The isDate function called upon just defines the number of days in each month etc.
Thanks
EDIT:[URL=http://pearly.zftp.com/jordan/hosting/date.html]Link to doc if needed