#4691 closed bug (invalid)
$('<input />').attr('name', 'name') [IE bug]
Reported by: | Arrviasto | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | input hidden IE8 IE7 attr | Cc: | |
Blocked by: | Blocking: |
Description
$('<input />').attr('name', 'name') method doesn't work on IE8 running in IE7 browser mode.
My code: var $inhid = $('<input />').attr('type','hidden'); var $posx = $inhid.clone().attr('name','x').val(x); var $posy = $inhid.clone().attr('name','y').val(y);
generates: <INPUT type="hidden" jQuery1243448158904="9" value="243" /><INPUT type="hidden" jQuery1243448158904="10" value="217" />
(missing name attribute)
I'm using Interface plugin (http://interface.eyecon.ro/), but in other parts of code (this is pure jQuery1.3.2)
Attachments (1)
Change History (3)
Changed 13 years ago by
Attachment: | test-4691.html added |
---|
comment:1 Changed 13 years ago by
Component: | build → core |
---|---|
need: | Test Case → Patch |
comment:2 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for the report, but this is not a jQuery bug. IE7 and earlier do not allow users to dynamically set the name
attribute of an input element at all. MSDN source
Test case for #4691; breaks in IE8 when in IE7-compat mode