wolverine said:
I would like to know if there is function to get the dom element
at any absolute coordinate. I know for IE there is a function. But
that will not work in other browsers like firefox. So do we have any
cross platform function which will get the dom element at any absolute
coordinate ?
[...]
Thanks for your reply. But i am looking for how to find element from
it's coordinates and NOT finding coordinates given an element. To be
more clear, i am looking for an equivalent of
document.elementFromPoint(x, y) which will work in FireFox
It is pretty much the same thing, only that you would have to find out the
absolute position of every element and compare with the given coordinates.
Thanks for spending your valuable time in reading and trying to answer
my question. Finding the absolute position of every element and then
comparing with given coordinates would be too costly if the web page
has a huge dom. The solution is almost like saying "i would walk 10km
daily to reach there instead of swimming 1km because i don't know to
swim."
The question is: Why do you think you need that?
PointedEars
I have a detect drag & drops (and some other things also) inside a web
page viewed in a browser. I inject javascript into web browser using
COM. Then i attach 'onmousedown/mousemove/onmouseup' to document and
on 'mouseup' i will get the (x,y) of the mouse. I also want to get
information about the element at (x,y). So i need the equivalent of
document.elementFromPoint(x, y).
Let it be clear that i don't write the web page. It can be written by
any web developer. Once again thanks for the reply.