Results 1 to 4 of 4
Thread: Get id of just selected checkbox
Sep 25, 2007, 23:20 #1
- Join Date
- Sep 2007
- 0 Post(s)
- 0 Thread(s)
Get id of just selected checkbox
There is only one thing missing, I would like to highlight the table row when a checkbox is checked. I know how to highlight a row:
color1 = 'ffffcc'; document.getElementById('row1').style.backgroundColor = color1;
But how do I get the Id for the row, when I only have this.CheckboxObj?
this.CheckboxObj.style.backgroundColor = color1;
only highlights the checkbox.
One solution I can think of is looping over all checkboxes and highlighting the rows that are checked and unhighlight the rows that are not, but this is to slow as I have over 200 checkboxes.