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

Discussion in 'Javascript' started by Robert Karlsson, Feb 29, 2004.

  1. Hi,


    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.


    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?

    Robert Karlsson
    Robert Karlsson, Feb 29, 2004
    1. Advertisements

  2. Robert Karlsson

    Ivo Guest

    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.
    Ivo, Feb 29, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.