Hi All, hopefully you can help.
I have:
<table> <tr> <td width="120" height="120" bgcolor="#8fd656" align="center" onClick="if (this.bgColor=='#8fd656'){this.bgColor='#DDDDDD'} else {this.bgColor='#8fd656'};">
Check Box <input type="checkbox" name="checkbox[]" id="checkbox[]" value="Checked"> </td> </tr> </table>
Now this works with changing the background color when I either click the cell itself or check / uncheck the box, but I ideally need it so that when the checkbox is ticked the background color of the cell changes and not by clicking the cell.
checkbox must be an array as there are up to 20 cells each with a checkbox dynamically built and these are posted.
Everything works as it should except for changing the color of the cell ONLY when the tick box is checked or unchecked. I cannot see a way of saying "when tickbox is checked, make td background color: #FFF"
Any help will be great.
Cheers
Ben