Re: Appending to table cells

Tech-Archive recommends: Fix windows errors by optimizing your registry





"SharkD" wrote:

Passing the argument, "-1", to "insertRow" and "insertCell" makes it
work in Firefox. I wonder if it works in other browsers...

DOH on me! I remember, now, discovering that a long time ago. Tch. Going
senile.

I just noticed that the insertCell method only inserts TD elements,
not TH. I'd rather not have to mess with the style properties, as
that's a great big hassle.

Can't you just clone your TH properties into a single style class and then
just apply that class to the inserted cell??
newcell = newrow.insertCell(-1);
newcell.className = "StyleThatLooksLikeTH";
??


.