jjfbuy
asked on
Highlight table row onmouseover... revert back to original bgcolor?
I have a table consisting of rows of alternating colors. On mouseover, I want the row to highlight in a third color. On mouseout, I want it to just revert back to the original bgcolor.
Right now, I'm using this function:
<script language="JavaScript">
function tdOver(obj) {
obj.style.background='yell ow';
}
function tdOut(obj) {
obj.style.background='';
}
</script>
And my row looks like this:
echo "<tr height=\"25\" valign=\"middle\" bgcolor=\"$row_color\" onmouseover=\"tdOver(this) \" onmouseout=\"tdOut(this)\" >";
In FF, this works as expected, but in IE, it doesn't revert back to the original bgcolor, it fills the whole row white. Does anyone know how I can get it to work the way I want it to in IE?
Right now, I'm using this function:
<script language="JavaScript">
function tdOver(obj) {
obj.style.background='yell
}
function tdOut(obj) {
obj.style.background='';
}
</script>
And my row looks like this:
echo "<tr height=\"25\" valign=\"middle\" bgcolor=\"$row_color\" onmouseover=\"tdOver(this)
In FF, this works as expected, but in IE, it doesn't revert back to the original bgcolor, it fills the whole row white. Does anyone know how I can get it to work the way I want it to in IE?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.