faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 2 people (50%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

how do I get the ( x , y ) coordinates of an anchor by its NAME and/or ID ?

Apr 8th, 2008 18:03
ha mo, Marshall Schaffer, Jamie Thompson, Matt Kruse (http://www.mattkruse.com)


This guy, Matt Kruse, has a JavaScript function that probably does what 
you want.
His website is http://www.mattkruse.com , and the script is called 
AnchorPosition.js .
It works for images, too, if you change the word anchor to image 
everywhere it appears (which is what I'm using it for). Change 'anchor' 
to 'image' and 'Anchor' to 'Image', if you use it for the purpose of 
finding image locations, and you'll be all set.
Also, it works with both IE6 and FF 1.04 .
It saved me a lot of headaches. Thanks to Matt for publishing this!
Regards and good luck.
- Marshall
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com