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分, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> 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 of B field?
>
> >    In my form, there are A and B fields, I have to call B's remote
> > method, when one of A and B have changed,
>
> >    coding:
> >        $(myForm).validate({
> >                rules: {
> >                        B: {
> >                                remote: function(){
> >                                        return 
> > "/validateABExist.do?A="+$("#A").val()
> >                        }
> >                messages: {
> >                        B: {
> >                                remote: "the combination of A and B is 
> > existed"
> >                        }
> >                }
> >        })
>
> >        $("#A").change(function() {
> >                //TODO: How to call B's remote method?
>
> >        });- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Reply via email to