Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by YAIRROSE on Sep 23, 2008 23:55
open dhtmlx forum
get absolute XY position from grid

Hi,
I placed a link inside a cell in grid and i would like to get the absolute position of the link for placing there a div with data.
how do i get/catch the position of the event ?
Thanks
Answer posted by dhtmlx support on Sep 24, 2008 06:35
You can get link object from the onclick event handler of the link.

<a  href="..." onclick="var ev =(event||arguments[0]);....">your link</a>

 Using ev you can get source html element and then get its position .

Grid has two internal functions which possibly could help you:

left = getAbsoluteLeft(obj);
top = getAbsoluteTop(obj);