View Single Post
Old 10-11-2012, 12:20 AM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,198
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
This code is nonsense:
Code:
    myArray[[col][row]] = cell.innerHTML;
SURELY you actually mean
Code:
    myArray[col][row] = cell.innerHTML;
But I also don't understand this:
Code:
    if (parseInt(cell.innerHTML)) {
What are you expecting that to do??? Are you trying to find out if the cell contents are a number? Okay, that works. But better would be to use ! isNaN( )

In any case, though, you don't provide any default value when the if test fails, so you that array element WILL NOT BE DEFINED. Unless, of course, it was defined earlier.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote