Calling a submit() as you have in an Anchor avoids the Event Handler
(onSubmit) of forms which would be called to execute to dynamically created
JS by CF.  If you want the validation code, generated by CF for the
<cfform>, to run you will need to submit the form normally.

You can however, add your own additional JS validation code to your template
and add an onSubmit="return yourfunction()" to the <cfform> tag and it will
execute along with validation code created by CF prior to submitting the
form.

Steven Semrau
SRA International, Inc.
Senior Member, Professional Staff
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Com:  (703) 805-1095
DSN:  (703) 655-1095


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 9:07 AM
To: CF-Talk
Subject: Anchor and CFFORM


I have a cfform with cfinput objects in which I want CF to create JS
validatiobn code. I also want to submit this form via an anchor using JS:

<a href="javascript:thisform.submit();">

This action submit the form, but does not execute the cfform validation
code. I can I get it to run?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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