Skip to main content

Bug Tracker

Side navigation

#2990 closed bug (duplicate)

Opened June 05, 2008 01:41PM UTC

Closed October 03, 2009 01:31AM UTC

Last modified March 14, 2012 10:06PM UTC

id starts with filter causes 'z.indexOf is not a function' error for radio button with name 'id'

Reported by: michelled Owned by:
Priority: minor Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

Here is the markup and code that causes the error:

<div id="contentwrapper">
  <div id="foo">
    <form>
      <input type="radio" name="id"  />
    </form>
  </div>

  <script type="text/javascript">
    var container = jQuery ("#contentwrapper");
    jQuery ("[id^=fo]", container);
  </script>
</div>

Using a more specific selector such as

"div[id^=fo]"
works fine.

Granted having the value of name being 'id' is not wise but jQuery should likely handle the case.

Attachments (0)
Change History (6)

Changed June 06, 2008 01:06AM UTC by flesler comment:1

component: coreselector

What version of jQuery are you using ?

If not 1.2.6, then update and recheck please.

Do come back to us after you try.

Changed June 13, 2008 12:19PM UTC by michelled comment:2

I tried this with 1.2.6 and the error still occurs.

Changed June 24, 2008 03:55PM UTC by t1mmyb comment:3

I'm getting this issue with a hidden input field with the name "action". Upgrading to 1.2.6 doesn't solve the issue.

Markup:

<input type="hidden" name="action" value="invite">

Changed October 03, 2009 01:30AM UTC by dmethvin comment:4

resolution: → invalid
status: newclosed

Duplicate of #3113. Don't use input names that match form properties like length, action, id, name, etc.

Changed October 03, 2009 01:31AM UTC by dmethvin comment:5

resolution: invalid
status: closedreopened

Changed October 03, 2009 01:31AM UTC by dmethvin comment:6

resolution: → duplicate
status: reopenedclosed