View Full Version : Browser mouse X Y coords?

07-09-2002, 08:01 PM
Hey all,

I know that event.screenX and event.screenY return the mouse position on the entire screen, but is there a way to return the mouse position relative to just the browser; or a work around? I've tried what seems like everything to no avail.

Thanks alot!

07-09-2002, 08:08 PM
relative to the client is not that big of a deal:

NS6.0+ IE5.0+:

however if you need the canvas coordinates for absolute positioning..... you are in for a few surprizes....

07-09-2002, 08:27 PM
actually I think clientX/Y did the trick, and I am using it for absolute positioning, but the canvas starts at 0,0 so I think thats why it worked.

07-09-2002, 08:40 PM
It does work until you have to scroll the page - then it goes haywire.... let me know what you are trying to do and I may be able to tell you what problems you will face...