Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] get <a> position


  • From: paul at juniperwebcraft.com (Paul Novitski)
  • Subject: [Javascript] get <a> position
  • Date: Tue Dec 26 14:55:32 2006

At 12/22/2006 04:44 AM, Michael Borchers wrote:
>i have a link <a href="#" onmouseover="getPosition(this.id)" id="foo[bar]">
>
>how can i can the position of the link <a> on the screen?


Do you mean the position on the screen or the position on the page?

I often rely on Peter-Paul Koch's scripts:
http://www.quirksmode.org/js/findpos.html

Tangentially, I recommend that you consider removing the JavaScript 
from your HTML and isolating it in external file, both for greater 
compatibility and for greater ease of maintenance in the future.

Regards,
Paul