parallon
08-31-2006, 09:24 PM
hello all. I have the following script in which I want to compare a date that is assigned to a variable against one in a text box. This is what I have thus far:
Function ChkDate()
var OldStart = "<%=ProjStart_Date%>";
var OldEnd = "<%=ProjEnd_Date%>";
if (new Date(OldStart) - new Date(document.MainForm.txtNewStart.value) == 0) {
alert("Your New Start Date is the same as the original.");
return
}
For some reason I can't seem to get it to work. Can anyone see anything wrong with this code?
Thanks,
Parallon
Function ChkDate()
var OldStart = "<%=ProjStart_Date%>";
var OldEnd = "<%=ProjEnd_Date%>";
if (new Date(OldStart) - new Date(document.MainForm.txtNewStart.value) == 0) {
alert("Your New Start Date is the same as the original.");
return
}
For some reason I can't seem to get it to work. Can anyone see anything wrong with this code?
Thanks,
Parallon