Acces to TD in array on html document ?

Giganews Newsgroups
Subject: Acces to TD in array on html document ?
Posted by:  Moi (m…@moi.com)
Date: Thu, 4 Sep 2003

Hi,

I have a 'small' problem for read and write something in TD cell

i try this:

d = window.document;

eTBL = d.getElementById('tbCal');
cTR = eTBL.getElementsByTagName('td');

cTD = new Array(); // Collection des TD ligne par ligne
for (i = 0; i < cTR.length; i++){
    cTD[i] = cTR[i].getElementsByTagName('td');
    alert("une cellule");
}

but if eTBL is correct...... cTR.length = 0

why this $%*#@ of value is 0???? my array have 8 lines with 7 cell for each,
but the first line have only 3 cell

HELP Please !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Replies