<%
Dim ADate
Dim BDate
Dim NowDate
ADate = FormatDateTime(Request.Form("ADate"),2)
BEndDate = FormatDateTime(Request.Form("BEndDate"),2)
NowDate = FormatDateTime(Now(),2)
If DateDiff("d",ADate,BDate) < 0 Then
Response.Write "<script language=""javascript"">alert(""The inputted date is NOT
valid."");document.frm1.ADate.focus();</script>"
Elseif DateDiff("d",NowDate,BDate) <= 0 Then
Response.Write "<script language=""javascript"">window.alert(""The inputted date is
EXCEEDED."");document.frm1.ADate.focus();</script>"
Else
Call MySubroutine End If
%>
The above codes work logically. but every page displays "The inputted date is NOT valid or The inputted date is EXCEEDED." If I put
"return false"" after .focus();return false;</script>. They still work, but alert msg does NOT display. Please help me. Thanks
all of you.
YoYo
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now