Hi everyone, I am having an issue with using document.create Element in IE (at least I think that's what the problem is). The following code snippet works in FireFox no problem, but doesn't show anything in IE. No errors are thrown during the execution. Does anyone know of any IE gotchas that would be pertinent to this case? Thanks!
Code:
<html>
<head>
<script type='text/javascript'>
window.onload = function(){
var tableRow = document.createElement('tr');
var tableCell = document.createElement('td');
var textNode = document.createTextNode('text goes here');
var table = document.getElementById('myTable');
tableCell.appendChild(textNode);
tableRow.appendChild(tableCell);
table.appendChild(tableRow);
};
</script>
</head>
<body>
<table id='myTable' />
</body>
</html>
Comment