Is your JQuery validation returning false?

Here is how I see it (I'm assuming here so don't shoot me)...

CFValidation = false
JQuery = true
One result is true so it processes.

CFValidation = true
JQuery = false
Same One result is true so it processes.

CFValidation = false
JQuery = false
Both are false processing ends.

CFValidation = true
JQuery = true
Both are true so it processes.

You either need to change your cfvalidation to be jquery, or build a
wrapper function for both validation that checks to make sure that both
validate before moving on.

Just a simple function that is, if CF or JQuery is false return false,
if both true return true.

Steve


-----Original Message-----
From: Michael Grant [mailto:mgr...@modus.bz] 
Sent: Tuesday, February 01, 2011 12:16 PM
To: cf-talk
Subject: Re: Form Validation Issue using cfinput AND jquery


I generally try to roll my own validation and just use <form> instead.
You
can much nicer validation. However with that being said I believe
whatever
you define in onSubmit="return  bla" will only fire if the cf validation
passes.

Ray explains it here:
http://www.coldfusionjedi.com/index.cfm/2008/1/11/Ask-a-Jedi-Mixing-cffo
rm-validation-and-ajaxbased-functions


On Tue, Feb 1, 2011 at 12:02 PM, Kelly Matthews <webd...@gmail.com>
wrote:

>
> Sorry if this ends up being a dupe post.
>
> I'm working on a client site that already had a CF Form in place using
> cfinput and validation via required="yes"
>
> We added some select boxes that are required and as most of you know
CF
> forms don't really validate those. So, I am using jquery to validate
the
> select boxes when the form is submitted.
>
> The problem I am running into is this: The jquery portion works AND
the CF
> validation errors are thrown as well. But if I fill in all the selects
that
> are validated via jquery and do not to fill in the fields that are
being
> required via cfinput required="yes", the error is thrown but the form
still
> submits.  Is this because of the jquery on submit validation?  Has
anyone
> run into this before, is there an easy fix, outside of moving the
cfinput
> validation into the jquery validation?
>
> Kelly Matthews
> Web Developer
> http://www.cfwebtools.com
> blog: http://kellymatthews.wordpress.com
> Twitter: @webdiva
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341789
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to