[ 3 posts ]

Benjamin Linton

  • Username: benlinton
  • Joined: Fri Jun 01, 2012 10:13 am
  • Posts: 3
  • GitHub: benlinton
  • Gists: benlinton
  • Offline
  • Profile

IE not rendering cloneNode() + node.append()?

Post Posted: Fri Jun 01, 2012 10:39 am
+0-
I'm cloning table tag only (<table> with attributes, classes, id only; no rows) and then trying to clone and append the first row as well. Works as expected in all browsers except IE (currently testing in IE8). In IE the innerHTML of the #container that holds the new table looks correct (in logs), but for some reason nothing in the #container is getting rendered on screen.

What am I missing? Thanks!

YUI table cloneNode append IE Fail

Click here to see the revision history on this Gist..

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: IE not rendering cloneNode() + node.append()?

Post Posted: Fri Jun 01, 2012 10:44 am
+1-
If memory serves, you need to add a TBODY to a dynamic table in IE:

Code:
<table>
    <tbody>
        <tr>
             <td></td>
        </tr>
    </tbody>
</table>

Benjamin Linton

  • Username: benlinton
  • Joined: Fri Jun 01, 2012 10:13 am
  • Posts: 3
  • GitHub: benlinton
  • Gists: benlinton
  • Offline
  • Profile

Re: IE not rendering cloneNode() + node.append()?

Post Posted: Fri Jun 01, 2012 10:53 am
+0-
That worked like a charm. Adding <tbody> to the cloned table resulted in IE rendering properly. Thanks Dav!
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum