3.2.0

Tablecell X Y coordinates...

How do I get the cell's x y coordinates relative to the window on an onclick event?

Thanks in advance,

Les Parker
Les Parker
June 11,
Try something like this:

var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

function getMouseXY(e) {
var x,y;
if(IE){
x = event.clientX + document.body.scrollLeft;
y = event.clientY + document.body.scrollTop;
} else {
x = e.pageX;
y = e.pageY;
}
// x and y are now the mouse X and Y
return true;
}
ThePsudo@gmail.com
March 21,
How b do we get a <b>table's</b> cell
June 20,

This topic is archived.

See also:


Back to support forum