Side navigation
#6432 closed bug (duplicate)
Opened April 14, 2010 03:23AM UTC
Closed June 15, 2010 12:45AM UTC
Can create chkbox in IE8,bug can't checked it
Reported by: | zhaixp1949 | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.2 | |
Component: | unfiled | Version: | 1.4.2 |
Keywords: | IE8 checkbox | Cc: | |
Blocked by: | Blocking: |
Description
$("<input>",{
"class":"ipt_blur",
checked : true,
type:"checkbox",
val:"Test"
}).appendTo("form");
Attachments (1)
Change History (5)
Changed April 14, 2010 03:28AM UTC by comment:1
Changed April 15, 2010 12:01AM UTC by comment:2
resolution: | → worksforme |
---|---|
status: | new → closed |
Your example works for me in IE8, it creates a check box that is checked. If you have an example that fails, reopen the ticket with a complete test file.
FYI, although it doesn't seem to affect your example, perhaps it is relevant. If you don't specify a type when creating a checkbox in IE, it defaults to text. Once created, it can only be changed once. This is a limitation in IE.
http://msdn.microsoft.com/en-us/library/ms534700%28VS.85%29.aspx
Changed May 10, 2010 01:26PM UTC by comment:3
resolution: | worksforme |
---|---|
status: | closed → reopened |
I have exactly the same problem - I've attached an example which doesn't work in IE6 or IE7. It appears to work in IE8 however, which is somewhat confusing since I originally ran across the problem there.
Changed June 12, 2010 02:32AM UTC by comment:4
Unfortunately, this is due to an underlying bug in IE. When a checkbox element is appended (independently of jQuery) it always loses the checked attribute. There isn't a simple workaround at the jQuery level.
Historical references:
http://www.felocity.org/blog/article/documentcreateelement_and_checkboxes/
test by IE 6,7 ,the same result as 8