[jQuery] Re: jQuery.validate: If the A field is changed, how to call the validate method of B field?

2008-06-25 Thread Jörn Zaefferer
The uppercase variants are all deprecated and won't be available anymore in the next release. Please stick with minlength, maxlength, rangelength, min, max and range. Jörn On Wed, Jun 25, 2008 at 5:02 AM, zhudp.cn <[EMAIL PROTECTED]> wrote: > > thanks very much! > > $("#B").data("previousValue",

[jQuery] Re: jQuery.validate: If the A field is changed, how to call the validate method of B field?

2008-06-24 Thread zhudp.cn
thanks very much! $("#B").data("previousValue", null); isn't effective, but $("#B").data("previousValue", ""); is OK. It's very A-OK. B: { remote: function(){ return "/validateABExist.do?A="+$("#A").val() +"&date="+new Date().getTime()} } $("#A")

[jQuery] Re: jQuery.validate: If the A field is changed, how to call the validate method of B field?

2008-06-24 Thread Jörn Zaefferer
The remote method caches the last entered value, and sends a new request only when the content changed. You could clear the cache manually: $("#B").data("previousValue", null); Let me know if that works for you. Jörn On Tue, Jun 24, 2008 at 11:15 AM, zhudp.cn <[EMAIL PROTECTED]> wrote: > > Tha

[jQuery] Re: jQuery.validate: If the A field is changed, how to call the validate method of B field?

2008-06-24 Thread zhudp.cn
Thank you for your reply! I have tried it, the first time of A happen changed, B's validate method is called. but the second time, B's validate method is called again. the breakPoint of java's programe hasn't called. cf: when the B happen changed, the A's value isn't changed.

[jQuery] Re: jQuery.validate: If the A field is changed, how to call the validate method of B field?

2008-06-24 Thread zhudp.cn
IThank you for your reply! I have tried it, the first time of A happen changed, B's validate method is called. but the second time, B's validate method is called again. the breakPoint of java's programe hasn't called. cf: when the B happen changed, the A's value isn't changed. On 6月24日, 下午3时45分

[jQuery] Re: jQuery.validate: If the A field is changed, how to call the validate method of B field?

2008-06-24 Thread Jörn Zaefferer
Use the valid method for that: http://docs.jquery.com/Plugins/Validation/valid $("#A").change(function() { $("#B").valid(); }); Jörn On Tue, Jun 24, 2008 at 4:34 AM, zhudp.cn <[EMAIL PROTECTED]> wrote: > > There is a question: If the A field is changed, how to call the > validate method