[RESOLVED] Going Nutz here with .getElementById
Ok, picture this...
Each cell of the table has an id tag that has been manually set.
I use document.getElementById( targetID ); to hook the cell.
targetID is generated from a function that I have tried with lots of variants and it returns an ID within the range of 0,1 to 6,5 (bit like x and y cords. This part I know works but the problems start with trying to apply properties to the hooked element.
results in the following error in the console
t = document.getElementById( targetID );
t.style.style.backgroundColor = "#FFFF66";
"Uncaught TypeError: Cannot read property 'style' of null "
And this is using an example directly off the W3Schools site.
I get the same when I try to access or set the elements colour by its .className property.
Does not matter if I try to put something in to that cell, the same error keeps on popping up.
If your post falls off the page, bump it. ...
Please remember to wrap any code you have in forum tags:-
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...