Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Zlatko Duric Newsgroups: comp.lang.javascript Subject: Re: Duplicating the last row of a Table Date: Sat, 18 Jan 2014 01:52:53 +0100 Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net wZUjeSYEUD/YNInp/143IglxlykaXMrvz/VnRruGdVpUsdeJwP Cancel-Lock: sha1:WM/ISEae/PiinFQRX2W5t3Nv4t8= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: Xref: csiph.com comp.lang.javascript:22662 That's a good behavior, because with the first quoted statement you're not getting a tbody element. You're getting its rows, and an array has no method appendChild (by default). On 01/17/2014 10:44 PM, Dr J R Stockton wrote: > var Rose = document.getElementById("TB").rows [cut] > Rose.appendChild(newnode); [cut] > Cel = Rose.item(Y).cells.item(X) So, you can do something like this to get the tbody: var tb = document.getElementById('tb'); and then use that in further code and append a row to tb. You get rows with something like document.getElementById('table-id').rows. -- Zlatko