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.
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.