M
Martin
I'm using the following function to insert a new row in a table. This
works fine - no problems. But, I would like to also set the background
color of the new row and I can't figure out how to do it.
I tried adding: Y.bgcolor='green'; after the Y.innerHTML = Msg1;
but that didn't work.
I tried adding:
document.getElementById('TableX').rows(1).bgcolor='green';
at the end of the funtion but that didn't work either.
Can someone give me a clue here?
Thanks
------------------------------------------------
function insRow(Msg1,Msg2)
{
var x=document.getElementById('TableX').insertRow(1);
var Y = x.insertCell(0);
var Z = x.insertCell(1);
Y.innerHTML = Msg1;
Z.innerHTML = Msg2;
}
works fine - no problems. But, I would like to also set the background
color of the new row and I can't figure out how to do it.
I tried adding: Y.bgcolor='green'; after the Y.innerHTML = Msg1;
but that didn't work.
I tried adding:
document.getElementById('TableX').rows(1).bgcolor='green';
at the end of the funtion but that didn't work either.
Can someone give me a clue here?
Thanks
------------------------------------------------
function insRow(Msg1,Msg2)
{
var x=document.getElementById('TableX').insertRow(1);
var Y = x.insertCell(0);
var Z = x.insertCell(1);
Y.innerHTML = Msg1;
Z.innerHTML = Msg2;
}