Why not use <CFFORM> and the validation built in? There's a "date" option
for that :)

----- Original Message -----
From: "James Taavon" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 7:39 AM
Subject: Date Validation


> I want to do check to see if users are entering the date properly in my
> form. Is this correct?
>
> <cfif #form.due_date# IS NOT #DateFormat(form.due_date, "mm/dd/yyyy")#>
> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
>     <!--
> alert ('Your Date entry is invalid.')
> location.href='javascript:window.history.back(1)'
>     //-->
>     </SCRIPT>
> <cfabort>
> </cfif>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to