Originally Posted by omkargit101
rowObj gives [Object Text] in an alert box.
this tells us that rowObj
is not a row object (that would show [object HTMLTableRowElement]), but a Text Node (part of the DOM interface). Text Nodes do not have a .cells
property (returning undefined
) and calling 
throws an error.
the problem is that the .firstChild
call in IE has lately been fixed to match the behaviour of all other browsers (whitespace between elements counts as a separate text node, while IE has been discarding that for certain elements). if supported, use the .firstElementChild
call (or make a workaround for it (e.g.) going through .childNodes
until you hit an element child).