:: Forum >>

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
Friday, June 11, 2004
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;
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;
Monday, March 21, 2005
How b do we get a <b>table's</b> cell
Tuesday, June 20, 2006

This topic is archived.

Back to support forum

Forum search