Skip to main content

Bug Tracker

Side navigation

#945 closed bug (fixed)

Opened February 12, 2007 03:14PM UTC

Closed April 05, 2007 01:47AM UTC

Last modified March 14, 2012 08:38PM UTC

<INPUT name="length"> cannot be found under IE

Reported by: zimbatm@oree.ch Owned by:
Priority: minor Milestone: 1.1.3
Component: core Version: 1.1a
Keywords: ie6 ie7 Cc:
Blocked by: Blocking:
Description

This is really incredible and took me some time to find out !

Problem

Load the mockup in IE6 or IE7, you'll get "0" instead of "1" printed on the alert box.

Workaround

Don't set input name attributes to "length".

Mockup

<html>
  <head>  
    <script type="text/javascript" src="http://jquery.com/src/jquery-latest.js"></script>
    <script type="text/javascript">
      $(function() { alert($('INPUT').length) });
    </script>
  </head>
  <body>
    <input name="length">
  </body>
</html>
Attachments (0)
Change History (5)

Changed February 23, 2007 03:10AM UTC by brandon comment:1

priority: majorminor

I've setup a test page with firebug lite here: http://brandon.jquery.com/testing/945/

Changed February 23, 2007 03:43AM UTC by brandon comment:2

I believe I finally tracked this down to the jQuery.merge method. The for loop in that method isn't running because the expression,

second.length
, points to the node instead of pointing to the size of the array.

Changed March 24, 2007 05:49PM UTC by john comment:3

milestone: → 1.1.3
need: → Test Case

Changed March 25, 2007 11:53AM UTC by joern comment:4

need: Test CasePatch

Added test in [1586].

Changed April 05, 2007 01:47AM UTC by john comment:5

resolution: → fixed
status: newclosed

Fixed in SVN.