[thelist] Issues with DOM-generated radio inputs
Lee Kowalkowski
lee.kowalkowski at lycos.com
Mon Feb 20 04:24:28 CST 2006
> From: "Randal Rust" <randalrust at gmail.com>
>
> 1. The biggest issue is that when I click on a radio button in IE, it
> does not get checked.
For a radio button to be checkable in IE, it needs to have a name. Sure, your alert displays the name of the radio button, however, if you do an alert of outerHTML, you'll find that name is absent. This is a known problem with IE.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/createelement.asp
In IE, an element created with createElement can only be given a name if you declare it in the createElement parameter:
document.createElement('<input name="myRadioButton">');
Of course, this is not valid DOM and will not work in other browsers. A cross-browser solution is offered at http://tag-strategia.com/blog/archives/2006/02/ie-dom-bugs/.
- LK
--
_______________________________________________
Search for businesses by name, location, or phone number. -Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
More information about the thelist
mailing list