If you clone a '<tr>' element with the 'cloneNode(true)' method in Mozilla or Opera the element remains to be a row element. Which means you can still use 'clonedRow.cells[]' for example.
In IE however the cloned row stops beeing a row element. So 'clonedRow.cells[]' now returns NULL.
You can test this by clicking the button below the table. This will set off two alerts:
In Mozilla and Opera both alerts will return the same value (3).
IE however will return NULL or 0 with the second alert.
| cell 1 | cell 2 | cell 3 |
var rowId;
var originalRow;
var clonedRow;
rowId = "row";
originalRow = document.getElementById(rowId);
alert("originalRow.cells.length: " + originalRow.cells.length);
clonedRow = originalRow.cloneNode(true);
alert("clonedRow.cells.length: " + clonedRow.cells.length);
Name: Rein Groot
Email: rein dot groot at gmail dot com