09-27-2007, 12:52 AM
|
#2 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Try this. Just set the onclick() action on the checkboxes to call change_row_colour(this). Like so:
Code:
onclick="change_row_colour(this)"
Here's the main part though:
javascript Code:
<script type="text/javascript">
var szColorTo = '#0000FF'; var szColorOriginal = '#FF0000'; function change_row_colour(pTarget) { var pTR = pTarget.parentNode.parentNode; if(pTR.nodeName.toLowerCase() != 'tr') { return; } if(pTarget.checked == true) { pTR.style.backgroundColor = szColorTo; } else { pTR.style.backgroundColor = szColorOriginal; } }
</script>
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Last edited by Wildhoney : 12-05-2007 at 03:46 AM.
|
|
|