No. There could be a solution-but it would take adjusting the source. 

 

Is the loop the problem?

 

The first part is to identify what's performing slowly, the second part is
figuring out ways to improve the speed. J

 

-Dan

 

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Web Specialist
Sent: Friday, June 29, 2007 8:57 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Joern Form Validation hangs IE when validate monster
forms

 

Thank you so much Dan for this great help. Reading your last paragraph looks
like don't exist any solution because IE manages very poorly loop form
fields, right?

Cheers

2007/6/29, Dan G. Switzer, II < [EMAIL PROTECTED]>:

Part of the problem is looping over tons of form field elements is always a
bit slow-especially in IE.

 

What I'd recommend doing is looking "form: function()" block in Jorn's code.
I suspect the problem is related to the block of code:

 

        form: function() {

            this.prepareForm();

            for ( var i = 0, element; element = this.elements[i]; i++ ) {

                this.check( element );

            }

            jQuery.extend(this.submitted, this.errorMap);

            return this.valid();

        },

 

My guess is it's taking 5-6 seconds to loop through all the elements. You
might try dumping an alert before and after the loop to time it. If that's
the case, probably the only way to fix it is to pre-build a cache of
elements to check based on the rules defined. 

 

The problem with looping through all the elements is it'll need to look at
every single form field in the form to see if there's anything that needs to
be done.

 

-Dan

 

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Web Specialist
Sent: Friday, June 29, 2007 7:59 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Joern Form Validation hangs IE when validate monster
forms

 

Last version - 1.1.

2007/6/29, Dan G. Switzer, II <[EMAIL PROTECTED]>:

Which version of the Validation plug-in are you using?

 

-Dan

 

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Web Specialist
Sent: Thursday, June 28, 2007 9:27 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Joern Form Validation hangs IE when validate monster forms

 

Hi all.

I have a monster form with more than 110 fields(separeted in tabs) to
validate before save in our DB. Every fields need easy validation like:
rules
...
                    pat_ds_veiculo_ano:{required:
"#pat_co_veiculos:checked",digits: true, rangeValue:[1905,2008]}, 
                    pat_vr_veiculo:{required: "#pat_co_veiculos:checked"},

                    pat_co_veiculo_alienado:{required:
"#pat_co_veiculos:checked"},     
                    pat_dt_alienacao_fim:{required:
"#pat_co_veiculo_alienado:checked",dateBR: true}, 
...
messages

and so on.

But with this validation routine IE hangs and after 6 seconds jQuery shows
me(if occured) error message for invalid field. 

Looking for workaround I test Jorn example:

http://jquery.bassistance.de/validate/demo-test/custom-methods-demo.html 

and insert 100 more fields. Surprise! IE hangs again and validation(error
message) occurs after 5, 6 seconds. 

Jorn Form Validation is a great great piece of code but looks like doesn't
scale for monster form. What's wrong with my form?

Cheers

 

 

Reply via email to