|
 |
asp_web_howto thread: validate the date
Message #1 by JonGrman21@a... on Wed, 29 Nov 2000 14:50:10 EST
|
|
hi,
im currently developing web pages on my laptop under windows nt. im trying
to validate the date entered. if anyone knows any javascript or anything
that could help me validate a date that is entered by the user that would be
greatly appreciated.
If u need further explanation to help u better understand just state that
fact.
Thank you
Message #2 by Roger Balliger <Roger@i...> on Wed, 29 Nov 2000 16:26:58 -0800
|
|
Although not very sophisticated, you could try the following script:
(This script assumes you have 2 pages, one for the form and one for the
processing of the form data which is called in the form action tag)
<%
Dim CheckCount, varCheck
varCheck = request.form("varDate") 'Enter your form Date field here
CheckCount = 0
If varCheck="" Then
Response.Write "<h4>Please make sure the Date field is
completed."
CheckCount = 1
End If
if CheckCount = 0 then
%>
<html>
<head>
<title>Untitled</title>
</head>
<body>
HTML CONTENT GOES HERE
</body>
</html>
<%End if%>
-----Original Message-----
From: JonGrman21@a... [mailto:JonGrman21@a...]
Sent: Wednesday, November 29, 2000 10:59 PM
To: ASP Web HowTo
Subject: [asp_web_howto] validate the date
hi,
im currently developing web pages on my laptop under windows nt. im trying
to validate the date entered. if anyone knows any javascript or anything
that could help me validate a date that is entered by the user that would be
greatly appreciated.
If u need further explanation to help u better understand just state that
fact.
Thank you
Message #3 by simon@p... on Thu, 30 Nov 2000 04:15:39 -0000
|
|
hi
what do you mean by validating the date? make sure that nobody enters a
date like 13-32-2000.5 ?
simon
Message #4 by JonGrman21@a... on Thu, 30 Nov 2000 10:16:22 EST
|
|
no i mean that i want them to enter into a text box the date in the format of
"MM/DD/YY" how do i validate it so i make sure its in that format
Message #5 by Robert Chartier <rchartierh@a...> on Thu, 30 Nov 2000 10:54:10 -0500
|
|
http://www.aspfree.com/devlinks/search.asp?file404=isdate#VBScript_Documentation
or a javascript -client-sided validator
or have seperate boxes one for each item MM DD and YY
At 10:16 AM 11/30/00, you wrote:
>no i mean that i want them to enter into a text box the date in the format of
>"MM/DD/YY" how do i validate it so i make sure its in that format
>
>---
>Wrox Professional Web Developer Conference II
>http://www.wroxconferences.com/WebDevEurope
>November 29th - December 1st 2000, Amsterdam, Netherlands
>Create powerful distributed web applications serving you now and
>in the future. From ASP+ and VB.NET to XML and SQL Server 2000
Robert Chartier
Author, AspFree.com
xxx-xxx-xxxx
rchartierh@a...
http://www.aspfree.com/devlinks
http://www.aspfree.com/authors/robert
http://www.aspalliance.com/nothingmn
|
|
 |