In order to use this from HTML, I would use
onClick="return validate()" for a button. Then the
function submits the form.
Not sure if this applies to your case or not.
--- Ang�l_Stewart <[EMAIL PROTECTED]> wrote:
> Ok, in order to validate a date of the format
> 01-Jan-2000, someone wrote a
> validation script for me in Javascript.
>
> Now i am having problems attaching it to the CFINPUT
> tags for the date
> fields.
>
> I tried:
> -------------------
> <cfform action="testdates.cfm" method="POST"
> enablecab="Yes">
> Wittle Text Box
> <cfinput type="Text" name="wittletextbox"
> message="Yuh have to type
> something here" required="Yes">
> <br>
> <cfinput type="Text" name="date" required="yes"
> onvalidate="javascript:validate();">
> <br>
> <input type="submit">
> </cfform>
> ---------------------
> But it does not seem to be calling the validate()
> function at all :-\
> The Validate Function starts off:
> ----------------
> <script language="JavaScript1.2"><!--
> function validate()
> {
> date = document.forms[0].Date.value.toLowerCase();
> var valid = "OK"
> var count = 0
> var GoodChars =
> "janfebmrpyulgsoctvd/:-0123456789"
> -------------
>
> Have any of you written you're own validation
> script,or used a third party
> one with Coldfusion?
> And if so, how was the script structured?
>
> I'm at a total loss here.
>
> -Gel
>
>
>
------------------------------------------------------------------------------
> Archives:
>
http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
>
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
> or send a message to
> [EMAIL PROTECTED] with 'unsubscribe'
> in the body.
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.