in your cfinput/cfselect/cf[formtagname]
add this parameter: onValidate

for instance:
<cfinput name="firstname" onValidate="textOnly" value="" message="Your First 
Name can only contain letters'>

When the form validates this field, it will call the javascript function in 
that parameter (textOnly).  In your javascript function, you will have 3 values 
sent to it.  The form object, the field object as well as the field object's 
value.  You use that information to verify that the validation is accurate and 
then return either 'true' or 'false'.  Coldfusion does the rest.

William

>Is there any way to *force* CFFORM to use JS that *I* specify to be used 
>for validation, and not the self-generated one?
>
>Here's the problem -
>
>I've got a bunch of related forms in a Spry tabbed panel set. But, each 
>CFFORM tag is generating it's own JS, so if you do a view source, you've 
>got the validation js repeated 10 times at the top of the page, and none 
>of the validation works.
>
>I'm trying to find a way to include a single JS file, and get all the 
>forms to reference that ONE js file and not generate multiples ...
>
>It's can't be one big form - each tab needs to be a separate (and 
>sometimes multiple forms on one tab) form unique unto itself. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312455
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to