I wrote a JavaScript library called FormValidation.js to handle this sort of
thing (as well as several other form validation needs).  See
http://66.0.48.14/js/ for basic documentation and code.  There are a couple
ways to approach this, but the library has a JS equivalent to the CF
DateCompare function so you could write a function something like this:

function doCheckDates() {
        if
(dateCompare(document.MyForm.DateA.value,document.MyForm.DateB.value) == 1)
{
                return confirm('Date A should be before Date B. Continue?');
        }
}

The library will parse most standard (non-European) date formats and is
backward compatible to NS4 and IE4.

Chris Lofback
Sr. Web Developer

TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL  33761
www.trxi.com


> -----Original Message-----
> From: Michael E. Carluen [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, September 21, 2002 5:21 PM
> To: CF-Talk
> Subject: Custom tag or Javascipt script for client_side date confirm
> 
> 
> I was wondering if anyone knows of an available custom tag or 
> a javascipt script that will compare 2 form date values... if 
> date A is later than date B,  display a javascipt confirm 
> window whether or not to proceed with the submission of the form.
> 
> Any help will be appreciated.
> 
> Michael
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to