page element - absolute position

  • Thread starter Microsoft Newsserver
  • Start date
M

Microsoft Newsserver

Im using IE 6/7 / ASP.NET / Javascript.

I need to determine the absolute position of elements on my page client
side. In summart, I need to know if an event triggered mouse position
appears inside a div.

Now the rub is that some divs may be absolutely positioned and some may be
positioned relatively. I know I can get the position of the mouse using
event.clientX or clientY.

But when determining the absolute position of an element, im stumped I know
I can use offet.Left, but if the element is nested then does this mean I
have to keep goinfg up the parent hierarchy until I reach the body to find
its position or is there a simpluer way, Im sure there is >

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top