Hi,
Say you have a table like this
<table id="table1">
<tr><td>stuff</td><td>more stuff</td></tr>
You can either write the mouseover directly on the first row -
<tr onmouseover="this.style.backgroundColor='red';"><td>stuff</td><td>more
stuff</td></tr>
or you can attach it with script
function setMouse(){
var t = document.getElementById('table1').getElementsByTagName('tr');
t[0].onmouseover = function(){this.style.backgroundColor='red';}
}
onload=setMouse;
Both of these would do the same thing - make the first row red onmouseover
--
Cheers,
Jon
Microsoft MVP
"RIGGS" <(E-Mail Removed)> wrote in message
news:CF2E2570-EF5C-4ED7-9308-(E-Mail Removed)...
>I want the user to be able to highlight the entire row of a database driven
> table no matter what column their mouse is ponted at. I know how to apply
> DHTML events to individual cells of a table but I am having trouble trying
> to
> apply it to the row.
>
> Any help would be appreciated. Thanks in advance.
|