Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-07 Thread Pascal
FYI, i added the following two lines to my custom function, and all is well. $.fn.validateForm = function() { var elems = this[0].elements || this; elems = $($.merge(elems, [])); elems.each(function() { // do custom validation stuff with each element

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-07 Thread Jörn Zaefferer
> If it doesn't break anything else, then we should probably get this > and the fix for #164 in SVN and get another point release out the > door. I just added a little something to attr, and according to the test suite, the problem known as bug #164 is now fixed. I'm not yet convinced that there

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-06 Thread Brandon Aaron
This actually doesn't fix the issue and doesn't seem like it is fixable since IE makes no distinction between the form node and the form.elements collection. The workaround is to do it like this: $($.merge(form.elements, [])); -- Brandon Aaron On 11/6/06, Brandon Aaron <[EMAIL PROTECTED]> wrot

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-06 Thread Jörn Zaefferer
> If it doesn't break anything else, then we should probably get this > and the fix for #164 in SVN and get another point release out the > door. I'm curious if this stuff fixes the weird errors that occured in the test suite somewhere since 1.0.2. Would be great if that is solved, too. -- Jörn

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-06 Thread Brandon Aaron
Okay ... looking through all the properties of the form.elements nodelist in IE reveals that it is exactly the form element as you said. That also means it has a reference to the elements property. So to fix this 'special case' I added this: this.get( a.constructor == Array || a.length != undefine

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-06 Thread Dave Methvin
> Do you know what the nodeType test is for on that line? That nodeType test is trying to tell the difference between a NodeList and a DOMElement. If it's a DOMElement it will have a non-zero nodeType. > What would break if we took it out? If you took it out, any DOMElement with a .length prope

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-05 Thread Brandon Aaron
I must have been in a hurry because I didn't realize your reference to the nodeType test was later in the constructor. Please disregard my previous email. Do you know what the nodeType test is for on that line? What would break if we took it out? -- Brandon Aaron

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-04 Thread Brandon Aaron
On 11/4/06, dave.methvin <[EMAIL PROTECTED]> wrote: > Since form.elements is a NodeList, it shouldn't have a nodeType; only > DOMElements should have nodeType. But IE's form.elements NodeList has a > nodeType=1, .nodeName="FORM" and its own .childNodes NodeList that returns > the same thing as form

Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-04 Thread dave.methvin
Pascal wrote: > >> i'm seeing a new, related problem that thought i should bring to your >> attention. this occurs in rev. 522 and 524. >> >> I'm calling $(form.elements).customPluginThatIWrote(). >> >> as a test, before this statement, i alert(form.elements.length), >> getting a value of 16 (th