Where is the mouse?!?

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

    #1

    Where is the mouse?!?

    I was thinking to use document.elemen tFromPoint to
    determine what element, if any, the mouse is over, but
    I need to know the mouse position for that since it
    takes (x,y) coordinates.

    I'm drawing a real blank on this. How do I get the mouse
    position if I'm not in an event handler?

    Thanks,
    Csaba Gabor from New York


  • Lasse Reichstein Nielsen

    #2
    Re: Where is the mouse?!?

    "Csaba2000" <news@CsabaGabo r.com> writes:[color=blue]
    > I'm drawing a real blank on this. How do I get the mouse
    > position if I'm not in an event handler?[/color]

    You can't. You just have to make an event handler (probably for
    "mousemove" ) and store the coordinates somewhere accessible.

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...