Firefox / Javascript question... how do I get the mouse X/Y position across frames?
August 2, 2004 1:32 AM
Subscribe
Firefox / Javascript question... how do I get the mouse X/Y position across frames (relative to the browser window, of course)
Say I've got a frameset like
--------| | || | |--------
Now if I have a
document.onmousedown = someFunction and then have
function someFunction(e), then the event 'e' will have
e.clientX and
e.pageX which hold the current mouse position relative to that frame. If I'm in the right frame though, then I'd need to add the width of the left frame to get the position relative to the browser window.
Is there some way to get the mouse position outside the frames, or without an 'e'? It's been driving me bonkers.
posted by holloway to computers & internet (3 comments total)
I'm assuming you don't need the "frames are evil" speech. ;)
posted by twine42 at 3:36 AM on August 2, 2004