Welcome to WebmasterWorld Guest from 54.166.191.159

Forum Moderators: open

Message Too Old, No Replies

Checking mouse leaves window

I want to terminate mouse over effects when mouse is out of window

     
7:57 pm on Jan 17, 2009 (gmt 0)

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



On my web site are several mouse over effects creating an overlay over the content area.

I watch with mouse over routines 3 recktangles

The object creating the mouse over
A bridge to the overlay
The overlay

When the mouse is out of all 3 objects, the mosue over effect is terminated.

But when the mouse leaves the window where the page is shown, the mouse over effect remains.

How can I controll, that the mouse over leaves the window?

3:19 pm on Jan 19, 2009 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I don't think there is an event for when the mouse leave the browser that you can capture. Why is it an issue? Maybe there is another solution.
4:37 pm on Jan 19, 2009 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



When the mouse is out of all 3 objects, the mosue over effect is terminated.

On what event are you currently triggering this?

4:49 pm on Jan 19, 2009 (gmt 0)

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



if(document.all){document.onmousemove=ocmie}
if(typeof(document.addEventListener)=="function")
{document.addEventListener("mousemove",ocmmoz,true)}

So standard different handlers for Mozilla or MSIE similar browsers

The event handler checks 3 rectangles for the mouse.

OVERLAY BRIDGE
OVERLAY BRIDGE MENU
OVERLAY BRIDGE
OVERLAY
OVERLAY
OVERLAY

The menu point which activates the effect, a bridge to the overlay, to move the mosue to the overlay and the overlay obejct

5:06 pm on Jan 19, 2009 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



When the mouse is out of all 3 objects, the mosue over effect is terminated.

Have you tried attaching to the onmouseout event?

5:36 pm on Jan 19, 2009 (gmt 0)

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Just tried

document.body.onmouseout=alert("HALLO");

error: not implemented

How would you implement mouseout for the body?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month