[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-05 Thread Jörn Zaefferer
[EMAIL PROTECTED] schrieb: And so is params and depends new functions that were not originally in the JQuery library? So do I have to update the core .js file on our app in order to use the params and depends on any validator method? The ticket is just that, a ticket. It isn't implemented ye

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-05 Thread [EMAIL PROTECTED]
Scott, I don't see how his example helps. He's hiding or showing a panel based on if the checkbox is checked. George, your suggested code didn't work after I tried it. On Mar 4, 11:57 am, Scott González <[EMAIL PROTECTED]> wrote: > Right now, the easiest way to accomplish this is to use parame

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-05 Thread [EMAIL PROTECTED]
And so is params and depends new functions that were not originally in the JQuery library? So do I have to update the core .js file on our app in order to use the params and depends on any validator method? On Mar 4, 2:14 pm, Scott González <[EMAIL PROTECTED]> wrote: > There is now a planned sol

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-05 Thread [EMAIL PROTECTED]
Thanks Scott. What's a planned solution? It says a ticket. So does that mean dependency checks were something just implemented in the fix in the API to allow us to do this? On Mar 4, 2:14 pm, Scott González <[EMAIL PROTECTED]> wrote: > There is now a planned solution for adding dependency check

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-04 Thread Jörn Zaefferer
[EMAIL PROTECTED] schrieb: Yes, correct on your analysis. Thanks a lot for the approach here. Alright, so I'm trying to get it working through this syntax above. [...] how can I shove your logic into my equalTo rule syntactically this way? Scott has some good suggestions, please take a lo

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-04 Thread Scott González
There is now a planned solution for adding dependency checks to all validation methods. See http://dev.jquery.com/ticket/2456 for more details. On Mar 3, 11:13 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How can I compare 2 text fields only if a certain checkbox is > checked? Can you d

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-04 Thread Scott González
An idea for a more robust solution is to modify equalTo() to accept: - DOMElement - jQuery object (first element will be used) - jQuery selector (first element found by selector will be used) - function (returns DOMElement, jQuery object or value) However, this only addresses part of your problem

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-04 Thread Scott González
Right now, the easiest way to accomplish this is to use parameter or class based validation and dynamically change the parameter/class when the checkbox is checked (see http://tinyurl.com/2f6dsn for a previous explanation I've given on this). Also, you may want to check out the second step of the

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-03 Thread [EMAIL PROTECTED]
Yes, correct on your analysis. Thanks a lot for the approach here. Alright, so I'm trying to get it working through this syntax above. So.if I have: $("#signupForm").validate({ rules: { billingAddress: { required: true minlength: 5 equalTo:

[jQuery] Re: EqualTo but only if checkbox is checked

2008-03-03 Thread George
I may not be sure what you're wanting but something like this may help: ... $("#billingAddress").val() == $("#shippingAddress").val() && $ ("#comparefields").is(":checked"); I presumed you are wanting to compare the billingAddress and shippingAddress values. George On Mar 3, 4:13 pm, "[EMAIL