normaal kun je van elementen geen positie bepalen, maar een uitzondering hierop zijn de A (link) elementen die wel een exacte positie hebben die je ook kunt uitlezen, op
http://www.xs4all.nl/~ppk/ staat een script dat hier gebruik van maakt
edit:
direct link: (had spiritX's post nog niet gezien)
http://www.xs4all.nl/~ppk/js/findpos.htmlFirst of all, let's deal with Netscape 4. In Netscape 4 each link or anchor (<A HREF> or <A NAME>) has two properties x and y that give the position of the link. No backtalk, no tricky stuff, just the true position of the link on the screen. If the window is resized x and y are updated.
Only when the link is in a layer these two properties give the position of the link in this layer. Then, too, they're completely reliable. However, my script doesn't calculate the position of the test links inside the layer relative to the page.
The only drawback is that these properties are only given to a link or anchor, not to any other HTML element.
maar het bezoek van de hele Pieter Paul Koch-website is zeker aan te raden gezien de uitstekende beschrijving/documentatie van scripts, object-modellen e.d.
Intelligente mensen zoeken in tijden van crisis naar oplossingen, Idioten zoeken dan schuldigen