HomeForumsWhat's newResources 
 
 
HTML Question
racketboy - Feb 14, 2005
 racketboy Feb 14, 2005
OK, here's what I want to do:

I want to have a table with about 5 columns and 16 rows.

Each table cell will have a checkbox and a corresponding description.

But I want the background color of the cell to change when that cell's checkbox it either checked or unchecked.

Is there a way to do this?

 it290 Feb 14, 2005
This page...

has code for doing what you want on mouseover; it should be fairly easy to adopt it to respond to clicks instead.

 racketboy Feb 20, 2005
Well I've got it to the point of changing the color to blue when you click on the checkbox, but I don't know how to change it back to white if you click it again (uncheck it)

 it290 Feb 20, 2005
Maybe add a function that checks against a value in an array to see whether a cell has already been clicked or not? I think you might be able to do it with the addEventListener function as well, but I'm not sure how compatible that is.

 Curtis Feb 20, 2005
Nasty hack alert! Nasty hack alert! Still, it works. :huh

 racketboy Feb 20, 2005
Thanks!