#1163 closed bug (wontfix)
oForm.elements problem in IE
Reported by: | mattcopeland | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.1.3 |
Component: | core | Version: | 1.1.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I was trying to iterate over my form elements using something like: $(oForm.elements).css({color:"#999999"}); This works in FF but not in IE.
I used the size method $(oForm.elements).size() and got the right number of elements in FF but only 1 element in IE.
It seems like FF gets a reference to the collection of elements while IE gets a reference to the form itself.
Change History (5)
comment:1 Changed 16 years ago by
comment:3 Changed 16 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I have rolled back the fix because passing in a form element is the same as passing in form.elements.
comment:4 Changed 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
I'm marking this as wontfix but I'm providing a work around. Please make sure to call $.makeArray(form.elements) before passing it into $(). Unfortunately IE leaves us no choice since the form element == form.elements.
The problem is the check for !a.nodeType in jQuery. Unfortunately, form.elements is essentially the form element and has a nodeType.