I'm a newbie, so I'll bet this is an easy one, but it has me stumped.
I want the background image in a table cell to change when the user presses the space bar within the cell. Here's the code. The alert box appears, but I keep getting the error message:
document.mytable is not an object.
I'm using IE5. Thanks for any help you can provide, I've tried everything I can think of. For example I tried just changing the background of the document rather than referencing the individual cell, but I got the same error.
Brilliant! Thanks Dave. My approach was to assign the table a name and then use the "document" object to reference it and then address the cells through the 'rows' and 'cells' collections. The documentation I've read indicates that this is a valid approach:
document.<name of element>
In my case <name of element> was 'mytable' (the name I assigned to the table withion the TABLE tag). The documentation goes on to say that individual cells of a table can be referenced through the 'rows' and 'cells' collections. This line of code was copied right out of the MSDN 6.0 documentation: