function checkOut()
{
if (document.survey.txtSD.value == "Start Date") {
alert("Please enter a start date.");
return(false);
}
else {
if (document.survey.txtSD.value != "End Date") {
If (Date.parse(document.survey.txtSD.value) > Date.parse(document.survey.txtED.value)) {
alert("Invalid Date Range!\nStart Date cannot be after End Date!")
return false;
}
else {document.survey.action = "document.asp";}
}
else {document.survey.action = "document.asp";}
}
}
Most of you should be able to cut and paste as you need. The presentation is poor (forgive me, it's hard to get the "}" parts to line up right.) This came in real handy for me. Hope it helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.