<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>&lt;html&gt;<br>
&lt;head&gt;<br>
&lt;title&gt;Results of JavaScript Test&lt;/title&gt;<br>
&lt;script type=&quot;text/javascript&quot;&gt;<br>
&nbsp;&nbsp; function testJavaScript() {<br>
&nbsp;&nbsp; try {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var table =
document.getElementById('mytable');<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(&quot;adding border&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; table.setAttribute('border','1');<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var txt =
document.createTextNode('xxx');<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var th =
document.createElement('th');<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; th.appendChild(txt);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tr =
document.createElement('tr');<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tr.appendChild(th);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; table.appendChild(tr);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert('done');<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp; catch (err) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(&quot;ERROR: &quot; + err);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp; }<br>
&lt;/script&gt;<br>
&lt;/head&gt;<br>
&lt;body id=&quot;htmlbody&quot;
onload=&quot;testJavaScript();&quot;&gt;<br>
&lt;table id=&quot;mytable&quot; border=&quot;0&quot;
frame=&quot;box&quot;&gt;<br>
&nbsp;&nbsp; &lt;tr&gt;&lt;th&gt;aaa&lt;/th&gt;&lt;/tr&gt;<br>
&lt;/table&gt;<br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>
</body>
</html>