Is it cross-browser to catch the mouse coordinates relative to a div box with this:
pos_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("thebox").offsetLeft;
pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("thebox").offsetTop;
this works for me; change to your framework:
In case you do not have all/most of the browser types/versions to test on, you might take a look at this:
W3C DOM Compatibility - Events
Linked from above: W3C DOM Compatibility - CSS Object Model View
Gives you an idea of how compatible the codes are.
}
this snippet will gives you mouse coordinates