[Javascript] Finding element at coordinates

Peter-Paul Koch gassinaumasis at hotmail.com
Mon May 17 15:27:04 CDT 2004



>>Is there a way to find out what element is at a location on a page? For 
>>example, find what's at the location (100px, 200px) from the top-left 
>>corner of the body?
>
>http://www.quirksmode.org/js/findpos.html

Sorry, I misread your question. My script does the opposite of what you 
want: it finds the coordinates of a given object.

I *think* there's an IE only property that contains the info you want 
(search MSDN), but I don't think there's a cross-browser script that does 
what you want.

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

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the Javascript mailing list