<html>
<body>
The following results in a second row, with a cell containing 'xxx',
being added to the table on the web page, but only in Firefox, not in IE
6. In IE 6, the JavaScript function runs - in fact, the 2 alerts pop up
and the border of the table is set to 1. But, the second row is not added
to the table. Any ideas?<br><br>
<br>
<tt><html><br>
<head><br>
<title>Results of JavaScript Test</title><br>
<script type="text/javascript"><br>
function testJavaScript() {<br>
try {<br>
var table =
document.getElementById('mytable');<br>
alert("adding border");<br>
table.setAttribute('border','1');<br>
var txt =
document.createTextNode('xxx');<br>
var th =
document.createElement('th');<br>
th.appendChild(txt);<br>
var tr =
document.createElement('tr');<br>
tr.appendChild(th);<br>
table.appendChild(tr);<br>
alert('done');<br><br>
}<br>
catch (err) {<br>
alert("ERROR: " + err);<br>
}<br>
}<br>
</script><br>
</head><br>
<body id="htmlbody"
onload="testJavaScript();"><br>
<table id="mytable" border="0"
frame="box"><br>
<tr><th>aaa</th></tr><br>
</table><br>
</body><br>
</html><br>
</body>
</html>