var myarray=new Array(4)
for (i=3; i <7; i++) myarray[i]=new Array(8);  

for (i=3;i<7;i++) {
	for (j=1;j<9;j++) {
		if (document.getElementById('mytable').rows[i].cells[j]!=null) {
		else myarray[i][j]=0;


Here is my code and i want to check if the cell exist and if it is true to take the content of the cell. But it gives me an error in the 6 line(which i believe is wrong):

Message: Object doesn't support this property or method


Start the indices at your choice of lower bound (instead of 0) and limit them to less than the corresponding .length (if necessary).

IIRC your table has more than one body; if so, you will have to further modify that code accordingly.