View a spreadsheet with synchronized frames.
View a map with synchronized frames.
Dynamic Synchronized Frames
freeze columns and rows for DHTML browsers
This tutorial can be appreciated by users of any browser, any version. The in-line examples will work only in Netscape Navigator 4 and Microsoft Internet Explorer 4 for Windows.
To fully appreciate this column, you must be familiar with frames, both conceptually and with the HTML required to create them. This knowledge will be assumed. Wouldn't you know it, we have an excellent introduction-to-frames article, right here at WebReference. For quick catch-up, or as a refresher, read Dan Brown's Framing The Web.
Frames are dying on the Web, or are they? In recent months, high traffic sites like WebReview and developer.com have done away with frameset documents in response to user request. Others, like net@ddress, have reduced the number of frames used. On the other hand, Microsoft and Netscape remain as frame-heavy as ever, especially Microsoft.
Frames have always been controversial. Although introduced in Netscape Navigator 2, they have only just now been included in the HTML standard (HTML 4.0). Authors find them efficient, navigational tools, while users gripe about the extra connections necessary, the difficult bookmarking, and the persistence of the frameset's TITLE in the browser titlebar.
Here, at WebReference, we have avoided frames-for-frames-sake authoring. Framesets are used only when absolutely necessary. See our web headlines page, for an excellent example of when frames actually make sense: the main frame is used for off-site pages, while a permananet navigation frame on the left is used to load them. This could only have been accomplished with frames.
Our present technique is another good use for frames. Use the links in the left column to view live applications in a new window. When the frameset has completely loaded, scroll the main frame in either direction. What happens to the left and top frames? The top and left frames behave like frozen row and column headers in regular spreadsheet applications. The top frame scrolls horizontally in tandem with the main frame. The left frame follows the main frame in a vertical scroll. (Excuse the poor quality of the images. All in the interest of faster download time.)
There are many uses for this technique:
- spreadsheet and accounting ledger publication
- longitude/latitude tracking on large maps
- distance charts
- any large, scrollable page that requires x-y coordinate tracking
In This Column
We will discuss:
For the first time, in our columns, we will learn to use:
Let's begin with a look at the creation of our frameset.