Thursday, May 12, 2005

IE can't set innerHTML for TBODY

In the following HTML, IE gives me "Unknown runtime error" at node.inner=fooBody.

<TABLE border="1">
<TR><TH>Col 1</TH><TH>Col 2</TH><TR>
<TBODY id="fooTbody">

<SCRIPT language="JavaScript">
var fooBody = "<TR><TD>Cell 1</TD><TD>Cell 2</TD></TR>";
var node = document.getElementById("fooTbody");
node.innerHTML = fooBody;


Anonymous said...


i too have a sane issue here.can u pls help me

--- raja

Alex said...

My solution is use DIV tag as container, then I set the whole table fragment into this DIV instead of TBODY.

Anonymous said...

Thanx.i too found tht.But i can't able to get the stylehseet now.keep trying

-- raja