DHTML Lab - DHTML Diner - Element Page Coordinates, Part 3 | WebReference

DHTML Lab - DHTML Diner - Element Page Coordinates, Part 3


Determining Element Page Coordinates, Part 3
NS6+, Mozilla and TABLEs

In Part 1 of this series of articles, we created JavaScript functions used to determine the page position of HTML elements, positioned or static, that expose position information about themselves.

In Part 2, we began expanding these functions to account for rule exceptions and browser quirks. Our first function modifications accounted for elements contained in TABLEs in IE for Windows.

In this article, we will look at Gecko-based browsers (Mozilla and Netscape 6+) and elements contained in TABLEs. Along the way, we will discuss the differences encountered in older and newer versions of these browsers as regards element offset hierarchies and rendering of the RULES and FRAME attributes for TABLEs.

It is highly recommended that you have a knowledge of the functions created in Part 1 and Part 2, as we will be expanding the same functions.

The in-page examples will be best appreciated when viewed with NS6+ or Mozilla as they are the browsers under discussion. Even better, try to view with NS7 or Mozilla 0.9.7+. We will be addressing these newer versions, in particular. When viewed with IEWin, the examples will work but won't give the result being discussed.

First, let's review the functions to-date.



Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Oct 16, 2002
Revised: Oct 16, 2002

URL: http://www.webreference.com/dhtml/diner/realpos3/