Thu, 01 Jun 2006

adding rows to tables using Javascript+DOM in IE

I've been doing some website work recently and came across an annoyance while checking to see how the page was working in Internet Explorer. The problem showed up when I was trying to add a row of data to a table using the mochikit.DOM API. After doing some google searching I finally found the problem and it seems when adding a row you have to encapslate it in a tbody tag in order for IE to render it. I'm not exactly sure why this is but it's sloved the problem.

So instead of appending <tr><td>data<td><tr> to the table I append <tbody><tr><td>data</td></tr></tbody> and it now works in IE.

posted at: 17:04 | path: /general | permanent link to this entry


Powered by PyBlosxom | RSS 2.0