Im trying to develop a set of javascript routines to control DHTML elements on webpages and am running into a problem:
When I try to obtain the placement of an element on a webpage by recursivly adding the offsetTop and offsetLeft values of the elements parents, the final x,y values area always off by the amount of the margin in the body of the document.
For instance if the document body css is:
<code>
BODY {
margin-left : 0px;
margin-right : 0px;
margin-top : 38px;
margin-bottom : 0px;
background-color : #cde7f7;
}
</code>
and the elements true x,y coordinates are:
<code>100,100</code>
I end up with an x,y value of:
<code>62,100</code>
Is this intentional or a bug and if its a bug where do I report and track it?
Also... how would I identify a Safari browser? Would its user agent still be "Konqueror"?
Thanks!!