Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am doing an onMouseOut event on a table, but the event is also taking place when I move from a cell onto another (through the same table) cellpadding and cellspacing are set to 0. I am working on IE7
Here's the code of the event:
<table cellpadding=0 cellspacing=0 id="m1s" onMouseOut="m1s.style.visibility='hidden'" style="cursor:hand; padding:0px; position:absolute; left:0px; top:0px; height:75px; width=100px; z-index:2; visibility:hidden"><tr><td...thanks :)

I don't have IE7 on the machine I am working on at the moment. But, it works in IE6 and FF and Opera. Do you have the same problem in any other browsers?
Michael J

I tried that also.
Here's my code:
<div id="m3s" onMouseOut="m3s.style.visibility='hidden'" style="cursor:hand; padding:0px; position:absolute; left:0px; top:0px; height:75px; width=100px; z-index:2; visibility:hidden">
<table cellpadding=0 cellspacing=0>
<tr height=25><td onclick="location.href='http://www.altavista.com'" style="background-color:'#1680ca'; color:'#d9e3e9'" onMouseOver="this.style.background='#d9e3e9'; this.style.color='#1680ca'" onMouseOut="this.style.background='#1680ca'; this.style.color='#d9e3e9'" width=100%><span class=fs12>Altavista</td></tr>
<tr height=25><td onclick="location.href='http://www.yahoo.com'" style="background-color:'#1680ca'; color:'#d9e3e9'" onMouseOver="this.style.background='#d9e3e9'; this.style.color='#1680ca'" onMouseOut="this.style.background='#1680ca'; this.style.color='#d9e3e9'" width=100%><span class=fs12>Yahoo!</td></tr>
<tr height=25><td onclick="location.href='http://www.google.com'" style="background-color:'#1680ca'; color:'#d9e3e9'" onMouseOver="this.style.background='#d9e3e9'; this.style.color='#1680ca'" onMouseOut="this.style.background='#1680ca'; this.style.color='#d9e3e9'" width=100%><span class=fs12>Google</td></tr>
</table>
</div>

to view it you have to change the visibility to visible in the div style
sorry for not telling you before
thanks all of you ;)

OK, I did my testing by changing the color onmouseout and had no anomolies. But, after some different scenarios I am getting the similar results. It appears that the onmouseout event is a momentary even when mouseing over a hyperlink.
However, in your situation I think there may be a workaround - assuming your implementation is similar to your example above. Since your div element is in a fixed position you could also give the div a fixed size. Then use the onmouseout trigger to call a function. That function can check the mouse pointer position and if it is outside the div then change the visibility of the div.
Michael J

I did it like this:
<div id="m3s" width=100 height=75 onMouseOut="m3s.style.visibility='hidden'" style="cursor:hand; padding:0px; position:absolute; left:0px; top:0px; height:75px; width=100px; z-index:2; visibility:visible">
<table cellpadding=0 cellspacing=0 >but did not work :/

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |