Hi,
I need, from firefox chrome, to get screen position of an element in a web
page (to show a popup to a position dependent of that element). Therefore, I
use:
var doc = element.ownerDocument;
var x = element.getBoundingClientRect().right
+ doc.getBoxObjectFor(doc.documentElement).screenX
+ doc.documentElement.scrollLeft;
and I get right border position.
but firefox3 outputs in console:
> Warning: Use of getBoxObjectFor() is deprecated. Try to use
> element.getBoundingClientRect() if possible.
Problem is getBoundingClientRect will not get screenX. Should I still use
getBoxObjectFor even if deprecated for html elements, or is there anothery way
to get screen position of an element ?
thanks