#2990 closed bug (duplicate)
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.
Change History (6)
comment:1 Changed 15 years ago by
Component: | core → selector |
---|
comment:3 Changed 15 years ago by
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">
comment:4 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Duplicate of #3113. Don't use input names that match form properties like length, action, id, name, etc.
comment:5 Changed 13 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:6 Changed 13 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
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.