Change table row/cell bgcolor when click checkbox

admin

Administrator
Staff member
Hello and thank you all in advance for your help.

I would like to create a scenario along the lines of what is used in
the Microsoft Hotmail inbox. I guess you could call it a "selected
row".

1) Table of multiple rows w/4 cells each, background color = white.
2) The first cell in each row contains a checkbox
3) Clicking on the checkbox changes the row's background color to
gold (or any other color for that matter).
4) Removing the check from the checkbox returns the row's background
color to white.

I have tried a number of methods but none seem to work properly. I
can't believe this is that difficult - any ideas?

Again, sincere thanks.

Regards,

Dominick

----------------------------------------------------------

Here's some table code showing the "on" and "off" state:

<table bgcolor="#bababa" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#bababa">

<table border="0" cellpadding="0" cellspacing="1">
<form>
<tr bgcolor="#eee8aa">
<td align="center" width="25"><input type="checkbox" checked></td>
<td width="100">&nbsp;</td>
<td width="100">&nbsp;</td>
<td width="100">&nbsp;</td>
</tr>

<tr bgcolor="#ffffff">
<td align="center" width="25"><input type="checkbox"></td>
<td width="100">&nbsp;</td>
<td width="100">&nbsp;</td>
<td width="100">&nbsp;</td>
</tr>
</form>
</table>

</td>
</tr>
</table>
 
Back
Top