Webskater
10-20-2003, 04:16 AM
I am trying to get the background color of the first cell in a row to change when I mouseover any cell in the row.
This function ...
function showup()
{
var table = agequeue;
var rowNo = event.srcElement.parentElement.parentElement.rowIndex;
var colNo = event.srcElement.parentElement.cellIndex;
table.rows[rowNo].cells[0].bgcolor = 'navy';
}
returns the correct reference to the cell I want to change but the background color won't change. I have tried
table.rows[rowNo].cells[0].style.background-color = 'navy'
but nothing happens.
Can anyone tell me how to do this please. Thanks.
This function ...
function showup()
{
var table = agequeue;
var rowNo = event.srcElement.parentElement.parentElement.rowIndex;
var colNo = event.srcElement.parentElement.cellIndex;
table.rows[rowNo].cells[0].bgcolor = 'navy';
}
returns the correct reference to the cell I want to change but the background color won't change. I have tried
table.rows[rowNo].cells[0].style.background-color = 'navy'
but nothing happens.
Can anyone tell me how to do this please. Thanks.