in my experience<tr onmouseover="color(this)">And that "color" function takes over and says...
function color(obj) {
for (var i=0; i < obj.cells.length; i++) {
obj.cells[i].style.backgroundColor = '#FFFFCC';
}
}
So, onmouseover, the TR object gets passed and the function runs a loop using the length of the TR cells[] array as a stop point. In each iteration of the loop, it sets the backgroundColor to a light yellow and then we use an onmouseout to clean up after it, using almost the same exact function, only with a different name and different color (in this case, light grey, or #CCCCCC).
| _Row_1_Cell_1_ | _Row_1_Cell_2_ | _Row_1_Cell_3_ | _Row_1_Cell_4_ | _Row_1_Cell_5_ | _Row_1_Cell_6_ |
| _Row_2_Cell_1_ | _Row_2_Cell_2_ | _Row_2_Cell_3_ | _Row_2_Cell_4_ | _Row_2_Cell_5_ | _Row_2_Cell_6_ |
| _Row_3_Cell_1_ | _Row_3_Cell_2_ | _Row_3_Cell_3_ | _Row_3_Cell_4_ | _Row_3_Cell_5_ | _Row_3_Cell_6_ |
| _Row_4_Cell_1_ | _Row_4_Cell_2_ | _Row_4_Cell_3_ | _Row_4_Cell_4_ | _Row_4_Cell_5_ | _Row_4_Cell_6_ |
[I don't mean to pick on Safari this week, I just happen to be dealing with it a lot and am finding some issues. I'm trying to help out by writing test cases and send them to the mother ship.]
[Update: Safari 1.1 doesn't fix the cells[] array.]
[Update: Safari 1.2 (which is Panther only) fixes the cells[] array.]