Hi,
Have you read through and tried the things in the other recent IE/
tables thread?
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/a99fdac0ae87bed3/98c6f03bb2d369cb
Specifically, you need a tbody.
Separately, a side note: Using innerHTML with a string will generally
be faster than adding things as you're doing in the example. The HTML
parsers in modern browsers are highly optimized and can work directly
with their own internals, whereas JavaScript code has to go through
both the JS interpreter (which isn't necessarily a problem) and also
the browser's DOM API. Parsing HTML is what browsers *do*,
fundamentally, and so except in situations (and yours may well be
one!) where you can't avoid it, inserting content using HTML strings
and innerHTML (or the update() method) is your best default choice.
Leverage the optimization they've done. E.g.:
$('parent').update('<table><tr><td>foo</td></tr></table>');
(Naturally there's an exception to this: I think when you're adding
form elements dynamically, you have to use DOM methods rather than
innerHTML for the elements to be recognized reliably on all browsers.)
HTH,
--
T.J. Crowder
tj / crowder software / com