Click to See Complete Forum and Search --> : y position of an anchor in a layer


tex
03-08-2003, 05:54 AM
I ask if it is possible to get the y position of an anchor in a layer i found a solution for the Internet Explorer by using document.all but this is of course not working for netscape I tried it with a simple example but It was not possible to get the solution.

Here is a link with the site I'm working on

www.tex-breakz.com/duf (http://www.tex-breakz.com/duf)

khalidali63
03-08-2003, 07:24 AM
You should be a ble to use the id attribute to get X and Y co-ords,
<a id="alink" ....> some link</a>

and then var obj = document.getElementById("alink")
obj.offsetLeft and offsetTop will give you X and Y.

Hope this helps

Khalid