[Javascript] True element coordinates on mouseevent.

Håkan Magnusson hakan at backbase.com
Tue Nov 4 06:39:49 CST 2003


Hi.

Is detecting the true element mouse coordinates (the exact coordinates 
of the mouse pointer on the element it's currently hovering, 
[event.]layerX/layerY (only absolutely position/Mozilla) or 
[event.]offsetX/offsetY(IE/Safari only)) still impossible? I remember 
trying to do this a few years back, when I found out that it only worked 
for elements with position: absolute, and that makes the function 
completely useless and very stupid indeed.

I'm running some tests now, but none of them makes me very happy.

Regards,
Håkan




More information about the Javascript mailing list