Mozilla works fine, and IE works if I change the type to 'chekbox'.
With non-standard createElement('<input type=... />'); works too, but
doesn't work anywhere else and looks horrible. Is this really a IE bug
or is creating forms this way unsupported by the standard? Using IE
6.0.2800.1106 /sp1 on w2k/sp3
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<link rel="stylesheet" href="default.css" type="text/css"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<script type="text/javascript">
function init()
{
var minput=document.createElement('input');
minput.type='radio';
minput.name='combination';
minput.value='dynamic';
document.getElementById('myForm').appendChild(minput);
var text=document.createTextNode('dynamic');
document.getElementById('myForm').appendChild(text);
}
</script>
<title>No javascript support!</title>
</head>
<body class="default" onload='init()'>
<form name="hv" action="blah.jsp" id="myForm">
<input type="radio" name="combination" value="static"/>static
</form>
</body>
</html>
<snip />
This is an IE bug, using innerHTML to parse the elements works fine
either in IE and Mozilla. Just createElement a SPAN, innerHTML it with
the radio, then move the radio node up and delete the span node to
clean up the tree.
hth...
Yep.