In IE the simple script below returns an alert with the ID of the first child node, in opera/firefox I get an alert with "undefined". Can ANYONE tell me why as I am way to dumb to work out why!
script below
<script type="text/javascript">
function getId(){
if (document.childNodes) {
var obj = document.getElementById("container")
alert(obj.childNodes[0].id)
}
}
</script>
<body onLoad="getId()">
<div id="container">
<div id="black">BLACK</div>
<div id="blue">BLUE</div>
</div>
</body>


