detecting mouse in other frame

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stuart

    #1

    detecting mouse in other frame

    The following code works well in monitoring the mouse position in its own
    frame, I need to capture the mouse position when it is over another frame,
    What is the correct syntax?

    There is two frames one named "upper" and one named "slave" all my coding is
    within the upper fame and I need to capture the mouse position when the
    mosue is above the frame named "slave".... .I have been using
    "parent.slave.d ocument" but ain't getting anywhere!

    *************** ******
    document.onmous emove = getMouseXY;
    var tempX = 0
    var tempY = 0

    function getMouseXY(e) {
    tempX = event.clientX + document.body.s crollLeft
    tempY = event.clientY + document.body.s crollTop
    status=tempX+' '+ tempY
    return true
    }

    *************** ******


  • Mike Foster

    #2
    Re: detecting mouse in other frame

    Stuart wrote:[color=blue]
    > The following code works well in monitoring the mouse position in its own
    > frame, I need to capture the mouse position when it is over another frame,
    > What is the correct syntax?[/color]

    Have a look at this little demo:

    Comment

    Working...