||View All MessagesBack to WebFX|
The best way is to use the following (more or less).|
1. Find the position relative to the viewport canvas (clientLeft, getBoundingClientRect().left)
2. Modify the value for the canvas border due to bugs in IE
3. Find the position of the window object representing the frame relative to the screen (window.screeLeft). This might give incorrect values for dual monitors with buggy drivers.
4. Find the position of the topmost window object relative to the screen (top.screenLeft) and get the difference.
Take a look at the poslib.js included in DHTML Menu 4 (take a fairly new one because the first ones were buggy)