APS NZ
asked on
onmouseover problem with HTML table
I am trying to use the onmouseover event with an html table cell. It works fine in IE, but not in FireFox
For testing I am using the following code
And the HTML is
(The HTML above is just for one cell, but the same is repeated several times with different cell IDs
I am coding in ColdFusion hence the #s.)
In Firefox the addCalColor and SetColor routines fire correctly, but the onmouseover event never fires.
If I add "This is a test" just before <TD... , the text appears, and when I hover over the text the onmouseover event fires as it should, but it will not fire for just an empty table cell.
What am I doing wrong?
For testing I am using the following code
<SCRIPT type="text/JavaScript">
<!-- hide
function FillCalGrid(Nme)
{
alert(Nme);
}
// stop hiding -->
</script>
And the HTML is
<A href="##" onmouseover="FillCalGrid('M1')"><TD vAlign=top width="13.13%" bgColor=#Trim(SetColor(GetShifts.Shift1))# ID=M1 onClick="addCalColor('M1')"><br><br> </TD></a>
(The HTML above is just for one cell, but the same is repeated several times with different cell IDs
I am coding in ColdFusion hence the #s.)
In Firefox the addCalColor and SetColor routines fire correctly, but the onmouseover event never fires.
If I add "This is a test" just before <TD... , the text appears, and when I hover over the text the onmouseover event fires as it should, but it will not fire for just an empty table cell.
What am I doing wrong?
Try putting   before <TD....> and see if that works.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the replies William and Dave
@William - sorry, does not work
@Dave it won't work if it is within the <td>, even in IE. I want to be able to hover anywhere within the cell.
@William - sorry, does not work
@Dave it won't work if it is within the <td>, even in IE. I want to be able to hover anywhere within the cell.
ASKER
Tested a bit more and @Dave you are correct - it now works - thanks very much!
You're welcome.