By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,567 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,567 IT Pros & Developers. It's quick & easy.

Where is the mouse?!?

P: n/a
I was thinking to use document.elementFromPoint 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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Csaba2000" <ne**@CsabaGabor.com> writes:
I'm drawing a real blank on this. How do I get the mouse
position if I'm not in an event handler?


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

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

This discussion thread is closed

Replies have been disabled for this discussion.