Hi everybody.
I'm making a Javascript system to build tables, so I can view large tables in smaller pieces. I use the "document.creat eElement" and "appendChil d" methods to create and remove elements from my table.
Got everything working, no problems. Until I test my code in IE.
After a little investigation, I create this:
[code=javascript]
<div id="ListContain er" class="Info">
<table id="ListTable" >
<tr>
<td>Hello</td>
</tr>
</table>
</div>
<script type="text/javascript">
var table = document.getEle mentById("ListT able");
var newRow = document.create Element("tr");
var newCol = document.create Element("td");
newCol.innerHTM L = "Row2";
newRow.appendCh ild(newCol);
table.appendChi ld(newRow);
</script>
[/code]
As before, this works in Firefox, which I use to debug my script. But fails in IE.
Weird thing is that IE usually flashes the error icon in the bottom-left corner when a script is broken, but that doesn't happen now.
Nothing happens, no errors, no changes.
I can't find anything wrong with this code.
Anybody know what is going on there?
I'm making a Javascript system to build tables, so I can view large tables in smaller pieces. I use the "document.creat eElement" and "appendChil d" methods to create and remove elements from my table.
Got everything working, no problems. Until I test my code in IE.
After a little investigation, I create this:
[code=javascript]
<div id="ListContain er" class="Info">
<table id="ListTable" >
<tr>
<td>Hello</td>
</tr>
</table>
</div>
<script type="text/javascript">
var table = document.getEle mentById("ListT able");
var newRow = document.create Element("tr");
var newCol = document.create Element("td");
newCol.innerHTM L = "Row2";
newRow.appendCh ild(newCol);
table.appendChi ld(newRow);
</script>
[/code]
As before, this works in Firefox, which I use to debug my script. But fails in IE.
Weird thing is that IE usually flashes the error icon in the bottom-left corner when a script is broken, but that doesn't happen now.
Nothing happens, no errors, no changes.
I can't find anything wrong with this code.
Anybody know what is going on there?
Comment