Computing.Net > Forums > Web Development > onMouseOut event not working good

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

onMouseOut event not working good

Reply to Message Icon

Name: clintxp
Date: March 26, 2007 at 06:39:33 Pacific
OS: Windows XP Pro
CPU/Ram: Intel P4 2.8E, 512MB PC40
Comment:

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 :)



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: March 26, 2007 at 07:33:58 Pacific
Reply:

Try putting the table in a div and putting the mouseout event on the div.

Michael J


0

Response Number 2
Name: clintxp
Date: March 26, 2007 at 08:22:19 Pacific
Reply:

I tried that also, the same result.


0

Response Number 3
Name: Michael J (by mjdamato)
Date: March 26, 2007 at 08:52:48 Pacific
Reply:

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


0

Response Number 4
Name: clintxp
Date: March 27, 2007 at 03:26:35 Pacific
Reply:

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>


0

Response Number 5
Name: clintxp
Date: March 27, 2007 at 03:29:07 Pacific
Reply:

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 ;)


0

Related Posts

See More



Response Number 6
Name: Michael J (by mjdamato)
Date: March 27, 2007 at 07:57:45 Pacific
Reply:

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


0

Response Number 7
Name: clintxp
Date: March 27, 2007 at 23:17:44 Pacific
Reply:

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 :/


0

Response Number 8
Name: clintxp
Date: March 28, 2007 at 07:27:31 Pacific
Reply:

ok solved, I found a function somewhere to arrange this bug/problem

thanks michael ;)


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: onMouseOut event not working good

Java Script not working on web site www.computing.net/answers/webdevel/java-script-not-working-on-web-site/1693.html

Ctrl key not working in DW8 www.computing.net/answers/webdevel/ctrl-key-not-working-in-dw8/2213.html

Virtualhost not working. www.computing.net/answers/webdevel/virtualhost-not-working/1701.html