[Javascript] Getting the X,Y coordinates of an image

Peter-Paul Koch gassinaumasis at hotmail.com
Wed Apr 9 15:19:28 CDT 2003



>If I have an image like this
><img id=image1 src='anImage.gif'>
>
>How do I get the top / left properties of that image relative to the 
>browser
>?
>
>is there something like this such as
>alert(document.all.image1.top.value) ???

See http://www.xs4all.nl/~ppk/js/index.html?findpos.html

--------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
--------------------------------------------------


_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



More information about the Javascript mailing list