[JavaScript] Getting element coordinates.
Walter Torres
walter at torres.ws
Tue Nov 18 11:50:54 CST 2003
I have a cross browser dHTML library that I've been using for a few years.
I didn't write (I wish).
It did not have a method for returning coordinates in it.
But, it does now. I just added it.
If you like, I'll email it to you off list.
Walter
> -----Original Message-----
> From: javascript-bounces at LaTech.edu
> [mailto:javascript-bounces at LaTech.edu]On Behalf Of Hakan M.
> Sent: Tuesday, November 18, 2003 11:14 AM
> To: [JavaScript List]
> Subject: [Javascript] Getting element coordinates.
>
>
> Hello list.
>
> Problem: I need to determine the _exact_ coordinates of an element on my
> page, relative to the documents top/leftmost corner. It has to work in
> IE5.0+ and Mozilla, both on Windows platform. It has to work on _all_
> elements - static, relative, absolute, float, you name it.
>
> Research suggests:
> Check the discussed browser flaws on ppks page.
> <http://www.quirksmode.org/js/findpos.html>
>
> Solution: None? I'm pondering on a function that iterates up, adding
> borders (if IE5->IE6) and checking for relative positioning and stop if
> I find any (if IE5.5) else continue until you run into...
>
> But it doesn't feel right. Any suggestions, or is it really this bad?
> (Someone please kill all employees at Microsoft?)
>
> Hakan
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list