C
chris f
Some of the cells in my ASP.NET 2 table have a popup that appears when the
user hovers the mouse over a text area that is indicated using an anchor
tag. The popup is implemented as a DIV tag (position: relative) and is
displayed and hidden using Javascript which calculates the popup position.
The table has vertical scrollbars and when the table is scrolled to the very
top then the popup is positioned correctly. However, if the table is
scrolled then the vertical positioning is incorrect and the popup isn't
visible at all.
Could someone help me out with the Javascript algorithm for setting the
popup position? I've looked at the DOM properties (offsetTop etc) but I
can't get a working algorithm that takes into account the scrollbar
position.
user hovers the mouse over a text area that is indicated using an anchor
tag. The popup is implemented as a DIV tag (position: relative) and is
displayed and hidden using Javascript which calculates the popup position.
The table has vertical scrollbars and when the table is scrolled to the very
top then the popup is positioned correctly. However, if the table is
scrolled then the vertical positioning is incorrect and the popup isn't
visible at all.
Could someone help me out with the Javascript algorithm for setting the
popup position? I've looked at the DOM properties (offsetTop etc) but I
can't get a working algorithm that takes into account the scrollbar
position.