[jQuery] Re: Validation Plugin: Too Much Recursion

2009-02-25 Thread kevinm

Ah ignore. Team member left of method attribute.

On Feb 25, 9:07 am, kevinm  wrote:
> Jörn ,
>
> New issue, that is related.
>
> When I use form.submit() inside the modal window it does not submit
> correctly.
>
> When we did this (before applying validate)
>
> function submitForm() {
>         document.myform.submit();
>          parent.$.nyroModalRemove();  // this closes the modal window
>         return false;
>
> }
>
> our submission from the modal worked.
>
> So for some reason doing the submit from the submit handler is
> different then what we did, or I am just doing things wrong.
>
> Ideally I am trying to avoid have to do a AJAX form submit
> Thanks
> Kevin
>
> On Feb 24, 1:35 pm, Jörn Zaefferer 
> wrote:
>
> > Here's hoping the next one finds 
> > this:http://docs.jquery.com/Plugins/Validation#Too_much_recursion
>
> > Jörn
>
> > On Tue, Feb 24, 2009 at 7:01 PM, kevinm  wrote:
>
> > > Ah, makes total sense. Thanks
>
> > > On Feb 24, 1:01 pm, Jörn Zaefferer 
> > > wrote:
> > >> $(form).submit() triggers another round of validation, resulting in
> > >> another call to submitHandler, and voila,recursion. Replace that with
> > >> form.submit(), which triggers the native submit event instead and not
> > >> the validation.
>
> > >> Jörn
>
> > >> On Tue, Feb 24, 2009 at 4:58 PM, kevinm  wrote:
>
> > >> > James,
>
> > >> > We just ran into the same issue. In my case we are opening a modal
> > >> > window with nyroModal. Here is thevalidatefunction.
>
> > >> > var myValidate = $("#myform").validate({
> > >> >                        ignoreTitle: true,
> > >> >                        focusCleanup: false,
> > >> >                        ignoreTitle: true,
> > >> >                        debug: true,
> > >> >                        onfocusout: false,
> > >> >                        submitHandler: function(form) {
> > >> >                                // do other stuff for a valid form
> > >> >                                $(form).submit();
> > >> >                                parent.$.nyroModalRemove(); return 
> > >> > false;
> > >> >                        },
> > >> >                rules: {
> > >> >                                        with_req_request_date: {
> > >> >                                        required: true,
> > >> >                                        date:true
> > >> >                                        },
> > >> >                                        with_req_request_type: {
> > >> >                                        required: true
> > >> >                                        },
> > >> >                                        withdrawal_reason_id: {
> > >> >                                        required: true
> > >> >                                        },
> > >> >                                        case_note: {
> > >> >                                        required: true
> > >> >                                        }
> > >> >                },
>
> > >> >                messages: {
> > >> >                with_req_request_date: "Please enter the date in proper
> > >> > 'mm/dd/' format",
> > >> >                    with_req_request_type: "Please select the request 
> > >> > type",
> > >> >                                withdrawal_reason_id: "Please select 
> > >> > the withdrawal reason",
> > >> >                                case_note: "Please enter the case note"
> > >> >            }
>
> > >> >                // } )
>
> > >> >                }) //End ofvalidate
>
> > >> > What I did notice if that I do not do the form.submit inside the
> > >> > submit handler therecursiondoes not occur.  Not sure if that helps.
> > >> > Also in this case this is the onlyvalidatecall.
>
> > >> > Kevin
>
> > >> > On Feb 9, 1:19 am, James  wrote:
> > >> >> Since you can't show any code, with only what I see there should not
> > >> >> be any issues...
> > >> >> That is, there is no issue with using twovalidatefunctions on two
> > >> >> different forms, each with it's own set of rules.
>
> > >> >> You're going to have to show more code for us to get to down to the
> > >> >> issue.
>
> > >> >> On Feb 8, 5:54 pm, Cutter  wrote:
>
> > >> >> > I have an odd thing happening with the Validation Plugin (latest 
> > >> >> > build
> > >> >> > on JQuery 1.3). I have several forms setup on a page, with 
> > >> >> > validation
> > >> >> > on two. My first works fine, but my second keeps giving me errors in
> > >> >> > Firebug about 'too muchrecursion'. The configs for these two form
> > >> >> > validations are nearly identical, with the exception of the rules 
> > >> >> > and
> > >> >> > messages, which are very basic field-is-requirewswwd kinda stuff. 
> > >> >> > Some
> > >> >> > searching on the web shows me that there used to be a ticket on this
> > >> >> > (#2995), but that it was closed without fix.
>
> > >> >> > I have stripped down my second form'svalidatemethod (the one that is
> > >> >> > erroring) to the barest of validation scripts, and can not get by it
> > >

[jQuery] Re: Validation Plugin: Too Much Recursion

2009-02-25 Thread kevinm

Jörn ,

New issue, that is related.

When I use form.submit() inside the modal window it does not submit
correctly.

When we did this (before applying validate)

function submitForm() {
document.myform.submit();
 parent.$.nyroModalRemove();  // this closes the modal window
return false;
}

our submission from the modal worked.

So for some reason doing the submit from the submit handler is
different then what we did, or I am just doing things wrong.

Ideally I am trying to avoid have to do a AJAX form submit
Thanks
Kevin

On Feb 24, 1:35 pm, Jörn Zaefferer 
wrote:
> Here's hoping the next one finds 
> this:http://docs.jquery.com/Plugins/Validation#Too_much_recursion
>
> Jörn
>
> On Tue, Feb 24, 2009 at 7:01 PM, kevinm  wrote:
>
> > Ah, makes total sense. Thanks
>
> > On Feb 24, 1:01 pm, Jörn Zaefferer 
> > wrote:
> >> $(form).submit() triggers another round of validation, resulting in
> >> another call to submitHandler, and voila,recursion. Replace that with
> >> form.submit(), which triggers the native submit event instead and not
> >> the validation.
>
> >> Jörn
>
> >> On Tue, Feb 24, 2009 at 4:58 PM, kevinm  wrote:
>
> >> > James,
>
> >> > We just ran into the same issue. In my case we are opening a modal
> >> > window with nyroModal. Here is thevalidatefunction.
>
> >> > var myValidate = $("#myform").validate({
> >> >                        ignoreTitle: true,
> >> >                        focusCleanup: false,
> >> >                        ignoreTitle: true,
> >> >                        debug: true,
> >> >                        onfocusout: false,
> >> >                        submitHandler: function(form) {
> >> >                                // do other stuff for a valid form
> >> >                                $(form).submit();
> >> >                                parent.$.nyroModalRemove(); return false;
> >> >                        },
> >> >                rules: {
> >> >                                        with_req_request_date: {
> >> >                                        required: true,
> >> >                                        date:true
> >> >                                        },
> >> >                                        with_req_request_type: {
> >> >                                        required: true
> >> >                                        },
> >> >                                        withdrawal_reason_id: {
> >> >                                        required: true
> >> >                                        },
> >> >                                        case_note: {
> >> >                                        required: true
> >> >                                        }
> >> >                },
>
> >> >                messages: {
> >> >                with_req_request_date: "Please enter the date in proper
> >> > 'mm/dd/' format",
> >> >                    with_req_request_type: "Please select the request 
> >> > type",
> >> >                                withdrawal_reason_id: "Please select the 
> >> > withdrawal reason",
> >> >                                case_note: "Please enter the case note"
> >> >            }
>
> >> >                // } )
>
> >> >                }) //End ofvalidate
>
> >> > What I did notice if that I do not do the form.submit inside the
> >> > submit handler therecursiondoes not occur.  Not sure if that helps.
> >> > Also in this case this is the onlyvalidatecall.
>
> >> > Kevin
>
> >> > On Feb 9, 1:19 am, James  wrote:
> >> >> Since you can't show any code, with only what I see there should not
> >> >> be any issues...
> >> >> That is, there is no issue with using twovalidatefunctions on two
> >> >> different forms, each with it's own set of rules.
>
> >> >> You're going to have to show more code for us to get to down to the
> >> >> issue.
>
> >> >> On Feb 8, 5:54 pm, Cutter  wrote:
>
> >> >> > I have an odd thing happening with the Validation Plugin (latest build
> >> >> > on JQuery 1.3). I have several forms setup on a page, with validation
> >> >> > on two. My first works fine, but my second keeps giving me errors in
> >> >> > Firebug about 'too muchrecursion'. The configs for these two form
> >> >> > validations are nearly identical, with the exception of the rules and
> >> >> > messages, which are very basic field-is-requirewswwd kinda stuff. Some
> >> >> > searching on the web shows me that there used to be a ticket on this
> >> >> > (#2995), but that it was closed without fix.
>
> >> >> > I have stripped down my second form'svalidatemethod (the one that is
> >> >> > erroring) to the barest of validation scripts, and can not get by it
> >> >> > for the life of me. The configs each set avalidate() method on a
> >> >> > separate form.
>
> >> >> > $('#frm1').validate({
> >> >> >    // config here
>
> >> >> > }
>
> >> >> > $('#frm2').validate({
> >> >> >     // second config here
>
> >> >> > }
>
> >> >> > I am getting nowhere. Anyone?
>
> >> >> > (BTW, I can't post the code, or show

[jQuery] Re: Validation Plugin: Too Much Recursion

2009-02-24 Thread Jörn Zaefferer
Here's hoping the next one finds this:
http://docs.jquery.com/Plugins/Validation#Too_much_recursion

Jörn

On Tue, Feb 24, 2009 at 7:01 PM, kevinm  wrote:
>
> Ah, makes total sense. Thanks
>
> On Feb 24, 1:01 pm, Jörn Zaefferer 
> wrote:
>> $(form).submit() triggers another round of validation, resulting in
>> another call to submitHandler, and voila,recursion. Replace that with
>> form.submit(), which triggers the native submit event instead and not
>> the validation.
>>
>> Jörn
>>
>> On Tue, Feb 24, 2009 at 4:58 PM, kevinm  wrote:
>>
>> > James,
>>
>> > We just ran into the same issue. In my case we are opening a modal
>> > window with nyroModal. Here is thevalidatefunction.
>>
>> > var myValidate = $("#myform").validate({
>> >                        ignoreTitle: true,
>> >                        focusCleanup: false,
>> >                        ignoreTitle: true,
>> >                        debug: true,
>> >                        onfocusout: false,
>> >                        submitHandler: function(form) {
>> >                                // do other stuff for a valid form
>> >                                $(form).submit();
>> >                                parent.$.nyroModalRemove(); return false;
>> >                        },
>> >                rules: {
>> >                                        with_req_request_date: {
>> >                                        required: true,
>> >                                        date:true
>> >                                        },
>> >                                        with_req_request_type: {
>> >                                        required: true
>> >                                        },
>> >                                        withdrawal_reason_id: {
>> >                                        required: true
>> >                                        },
>> >                                        case_note: {
>> >                                        required: true
>> >                                        }
>> >                },
>>
>> >                messages: {
>> >                with_req_request_date: "Please enter the date in proper
>> > 'mm/dd/' format",
>> >                    with_req_request_type: "Please select the request type",
>> >                                withdrawal_reason_id: "Please select the 
>> > withdrawal reason",
>> >                                case_note: "Please enter the case note"
>> >            }
>>
>> >                // } )
>>
>> >                }) //End ofvalidate
>>
>> > What I did notice if that I do not do the form.submit inside the
>> > submit handler therecursiondoes not occur.  Not sure if that helps.
>> > Also in this case this is the onlyvalidatecall.
>>
>> > Kevin
>>
>> > On Feb 9, 1:19 am, James  wrote:
>> >> Since you can't show any code, with only what I see there should not
>> >> be any issues...
>> >> That is, there is no issue with using twovalidatefunctions on two
>> >> different forms, each with it's own set of rules.
>>
>> >> You're going to have to show more code for us to get to down to the
>> >> issue.
>>
>> >> On Feb 8, 5:54 pm, Cutter  wrote:
>>
>> >> > I have an odd thing happening with the Validation Plugin (latest build
>> >> > on JQuery 1.3). I have several forms setup on a page, with validation
>> >> > on two. My first works fine, but my second keeps giving me errors in
>> >> > Firebug about 'too muchrecursion'. The configs for these two form
>> >> > validations are nearly identical, with the exception of the rules and
>> >> > messages, which are very basic field-is-requirewswwd kinda stuff. Some
>> >> > searching on the web shows me that there used to be a ticket on this
>> >> > (#2995), but that it was closed without fix.
>>
>> >> > I have stripped down my second form'svalidatemethod (the one that is
>> >> > erroring) to the barest of validation scripts, and can not get by it
>> >> > for the life of me. The configs each set avalidate() method on a
>> >> > separate form.
>>
>> >> > $('#frm1').validate({
>> >> >    // config here
>>
>> >> > }
>>
>> >> > $('#frm2').validate({
>> >> >     // second config here
>>
>> >> > }
>>
>> >> > I am getting nowhere. Anyone?
>>
>> >> > (BTW, I can't post the code, or show you a form, because it's all
>> >> > behind the firewall)


[jQuery] Re: Validation Plugin: Too Much Recursion

2009-02-24 Thread kevinm

Ah, makes total sense. Thanks

On Feb 24, 1:01 pm, Jörn Zaefferer 
wrote:
> $(form).submit() triggers another round of validation, resulting in
> another call to submitHandler, and voila,recursion. Replace that with
> form.submit(), which triggers the native submit event instead and not
> the validation.
>
> Jörn
>
> On Tue, Feb 24, 2009 at 4:58 PM, kevinm  wrote:
>
> > James,
>
> > We just ran into the same issue. In my case we are opening a modal
> > window with nyroModal. Here is thevalidatefunction.
>
> > var myValidate = $("#myform").validate({
> >                        ignoreTitle: true,
> >                        focusCleanup: false,
> >                        ignoreTitle: true,
> >                        debug: true,
> >                        onfocusout: false,
> >                        submitHandler: function(form) {
> >                                // do other stuff for a valid form
> >                                $(form).submit();
> >                                parent.$.nyroModalRemove(); return false;
> >                        },
> >                rules: {
> >                                        with_req_request_date: {
> >                                        required: true,
> >                                        date:true
> >                                        },
> >                                        with_req_request_type: {
> >                                        required: true
> >                                        },
> >                                        withdrawal_reason_id: {
> >                                        required: true
> >                                        },
> >                                        case_note: {
> >                                        required: true
> >                                        }
> >                },
>
> >                messages: {
> >                with_req_request_date: "Please enter the date in proper
> > 'mm/dd/' format",
> >                    with_req_request_type: "Please select the request type",
> >                                withdrawal_reason_id: "Please select the 
> > withdrawal reason",
> >                                case_note: "Please enter the case note"
> >            }
>
> >                // } )
>
> >                }) //End ofvalidate
>
> > What I did notice if that I do not do the form.submit inside the
> > submit handler therecursiondoes not occur.  Not sure if that helps.
> > Also in this case this is the onlyvalidatecall.
>
> > Kevin
>
> > On Feb 9, 1:19 am, James  wrote:
> >> Since you can't show any code, with only what I see there should not
> >> be any issues...
> >> That is, there is no issue with using twovalidatefunctions on two
> >> different forms, each with it's own set of rules.
>
> >> You're going to have to show more code for us to get to down to the
> >> issue.
>
> >> On Feb 8, 5:54 pm, Cutter  wrote:
>
> >> > I have an odd thing happening with the Validation Plugin (latest build
> >> > on JQuery 1.3). I have several forms setup on a page, with validation
> >> > on two. My first works fine, but my second keeps giving me errors in
> >> > Firebug about 'too muchrecursion'. The configs for these two form
> >> > validations are nearly identical, with the exception of the rules and
> >> > messages, which are very basic field-is-requirewswwd kinda stuff. Some
> >> > searching on the web shows me that there used to be a ticket on this
> >> > (#2995), but that it was closed without fix.
>
> >> > I have stripped down my second form'svalidatemethod (the one that is
> >> > erroring) to the barest of validation scripts, and can not get by it
> >> > for the life of me. The configs each set avalidate() method on a
> >> > separate form.
>
> >> > $('#frm1').validate({
> >> >    // config here
>
> >> > }
>
> >> > $('#frm2').validate({
> >> >     // second config here
>
> >> > }
>
> >> > I am getting nowhere. Anyone?
>
> >> > (BTW, I can't post the code, or show you a form, because it's all
> >> > behind the firewall)


[jQuery] Re: Validation Plugin: Too Much Recursion

2009-02-24 Thread Jörn Zaefferer
$(form).submit() triggers another round of validation, resulting in
another call to submitHandler, and voila, recursion. Replace that with
form.submit(), which triggers the native submit event instead and not
the validation.

Jörn

On Tue, Feb 24, 2009 at 4:58 PM, kevinm  wrote:
>
> James,
>
> We just ran into the same issue. In my case we are opening a modal
> window with nyroModal. Here is the validate function.
>
> var myValidate = $("#myform").validate({
>                        ignoreTitle: true,
>                        focusCleanup: false,
>                        ignoreTitle: true,
>                        debug: true,
>                        onfocusout: false,
>                        submitHandler: function(form) {
>                                // do other stuff for a valid form
>                                $(form).submit();
>                                parent.$.nyroModalRemove(); return false;
>                        },
>                rules: {
>                                        with_req_request_date: {
>                                        required: true,
>                                        date:true
>                                        },
>                                        with_req_request_type: {
>                                        required: true
>                                        },
>                                        withdrawal_reason_id: {
>                                        required: true
>                                        },
>                                        case_note: {
>                                        required: true
>                                        }
>                },
>
>                messages: {
>                with_req_request_date: "Please enter the date in proper
> 'mm/dd/' format",
>                    with_req_request_type: "Please select the request type",
>                                withdrawal_reason_id: "Please select the 
> withdrawal reason",
>                                case_note: "Please enter the case note"
>            }
>
>                // } )
>
>                }) //End of validate
>
> What I did notice if that I do not do the form.submit inside the
> submit handler the recursion does not occur.  Not sure if that helps.
> Also in this case this is the only validate call.
>
> Kevin
>
> On Feb 9, 1:19 am, James  wrote:
>> Since you can't show any code, with only what I see there should not
>> be any issues...
>> That is, there is no issue with using twovalidatefunctions on two
>> different forms, each with it's own set of rules.
>>
>> You're going to have to show more code for us to get to down to the
>> issue.
>>
>> On Feb 8, 5:54 pm, Cutter  wrote:
>>
>> > I have an odd thing happening with the Validation Plugin (latest build
>> > on JQuery 1.3). I have several forms setup on a page, with validation
>> > on two. My first works fine, but my second keeps giving me errors in
>> > Firebug about 'too muchrecursion'. The configs for these two form
>> > validations are nearly identical, with the exception of the rules and
>> > messages, which are very basic field-is-requirewswwd kinda stuff. Some
>> > searching on the web shows me that there used to be a ticket on this
>> > (#2995), but that it was closed without fix.
>>
>> > I have stripped down my second form'svalidatemethod (the one that is
>> > erroring) to the barest of validation scripts, and can not get by it
>> > for the life of me. The configs each set avalidate() method on a
>> > separate form.
>>
>> > $('#frm1').validate({
>> >    // config here
>>
>> > }
>>
>> > $('#frm2').validate({
>> >     // second config here
>>
>> > }
>>
>> > I am getting nowhere. Anyone?
>>
>> > (BTW, I can't post the code, or show you a form, because it's all
>> > behind the firewall)


[jQuery] Re: Validation Plugin: Too Much Recursion

2009-02-24 Thread kevinm

James,

We just ran into the same issue. In my case we are opening a modal
window with nyroModal. Here is the validate function.

var myValidate = $("#myform").validate({
ignoreTitle: true,
focusCleanup: false,
ignoreTitle: true,
debug: true,
onfocusout: false,
submitHandler: function(form) {
// do other stuff for a valid form
$(form).submit();
parent.$.nyroModalRemove(); return false;
},
rules: {
with_req_request_date: {
required: true,
date:true
},
with_req_request_type: {
required: true
},
withdrawal_reason_id: {
required: true
},
case_note: {
required: true
}
},

messages: {
with_req_request_date: "Please enter the date in proper
'mm/dd/' format",
with_req_request_type: "Please select the request type",
withdrawal_reason_id: "Please select the 
withdrawal reason",
case_note: "Please enter the case note"
}

// } )

}) //End of validate

What I did notice if that I do not do the form.submit inside the
submit handler the recursion does not occur.  Not sure if that helps.
Also in this case this is the only validate call.

Kevin

On Feb 9, 1:19 am, James  wrote:
> Since you can't show any code, with only what I see there should not
> be any issues...
> That is, there is no issue with using twovalidatefunctions on two
> different forms, each with it's own set of rules.
>
> You're going to have to show more code for us to get to down to the
> issue.
>
> On Feb 8, 5:54 pm, Cutter  wrote:
>
> > I have an odd thing happening with the Validation Plugin (latest build
> > on JQuery 1.3). I have several forms setup on a page, with validation
> > on two. My first works fine, but my second keeps giving me errors in
> > Firebug about 'too muchrecursion'. The configs for these two form
> > validations are nearly identical, with the exception of the rules and
> > messages, which are very basic field-is-requirewswwd kinda stuff. Some
> > searching on the web shows me that there used to be a ticket on this
> > (#2995), but that it was closed without fix.
>
> > I have stripped down my second form'svalidatemethod (the one that is
> > erroring) to the barest of validation scripts, and can not get by it
> > for the life of me. The configs each set avalidate() method on a
> > separate form.
>
> > $('#frm1').validate({
> >    // config here
>
> > }
>
> > $('#frm2').validate({
> >     // second config here
>
> > }
>
> > I am getting nowhere. Anyone?
>
> > (BTW, I can't post the code, or show you a form, because it's all
> > behind the firewall)


[jQuery] Re: Validation Plugin: Too Much Recursion

2009-02-08 Thread James

Since you can't show any code, with only what I see there should not
be any issues...
That is, there is no issue with using two validate functions on two
different forms, each with it's own set of rules.

You're going to have to show more code for us to get to down to the
issue.

On Feb 8, 5:54 pm, Cutter  wrote:
> I have an odd thing happening with the Validation Plugin (latest build
> on JQuery 1.3). I have several forms setup on a page, with validation
> on two. My first works fine, but my second keeps giving me errors in
> Firebug about 'too much recursion'. The configs for these two form
> validations are nearly identical, with the exception of the rules and
> messages, which are very basic field-is-requirewswwd kinda stuff. Some
> searching on the web shows me that there used to be a ticket on this
> (#2995), but that it was closed without fix.
>
> I have stripped down my second form's validate method (the one that is
> erroring) to the barest of validation scripts, and can not get by it
> for the life of me. The configs each set a validate() method on a
> separate form.
>
> $('#frm1').validate({
>    // config here
>
> }
>
> $('#frm2').validate({
>     // second config here
>
> }
>
> I am getting nowhere. Anyone?
>
> (BTW, I can't post the code, or show you a form, because it's all
> behind the firewall)