Try this.
<script type='text/javascript'>
var trs = document.getElementsByTagName('tr');
for(var i=0; i< trs.length; i++)
{
trs[i].onclick = "color(this)";
}
function color(obj)
{
for(var i=0; i < trs.length; i++)
{
var cells = trs[i].getElementsByTagName('td');
for(var p=0; p < cells.length; p++)
{
cells[i].style.backgroundColor = 'white';
}
}
currentCells = obj.getElementsByTagName('td');
for(var n=0;n<currentCells.length;n++)
{
currentCells[n].style.backgroundColor = 'green';
}
}
</script>
Just include that script and let me know if it works how you like.
-Snib
<><
Try new FreshView 0.2!
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)