Preventing onmouseout event trigger in body tag when passing over children?

R

Robert Karlsson

Hi,

Situation

Frameset with two frames.
------------------
top navigation
------------------
main content
------------------

When the cursor leaves the top frame I want to trigger a function
reset() that restores the top frame to a default state.

Problem

Including an <body onmouseout="reset()"> in the top frame's body
would do the trick... the only problem is that the event is triggered
each time the cursor passes over a child object in the body, say an
image or a link.

I've been looking at "onmouseleave" which does the trick but that only
works for IE. Cross platform compatibility would be nice.

Any ideas?

Best
Robert Karlsson
 
I

Ivo

Robert Karlsson said:
Hi,

Situation

Frameset with two frames.
------------------
top navigation
------------------
main content
------------------

When the cursor leaves the top frame I want to trigger a function
reset() that restores the top frame to a default state.

Problem

Including an <body onmouseout="reset()"> in the top frame's body
would do the trick... the only problem is that the event is triggered
each time the cursor passes over a child object in the body, say an
image or a link.

I've been looking at "onmouseleave" which does the trick but that only
works for IE. Cross platform compatibility would be nice.

Any ideas?

Best
Robert Karlsson

First thing the resetting function should do is check whether the calling
element (that triggered the event) is a child of the body element, and if
so, return idle.
HTH
Ivo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top