magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1997 > 07 > Script Junkie  

Accurate Wayfinding with JavaScript

By Bart Marable and Raymond Simmons

As Web sites become increasingly rich and complex, creating an accurate, consistent wayfinding system becomes ever more important. Both JavaScript and frames enhance a site's navigation tools: frames, by providing a consistent space on the screen dedicated to wayfinding; and JavaScript, by providing important navigation feedback, such as rollover buttons and changeable images. But combining JavaScript and frames often yields unpredictable results. For example, JavaScript can change a navigation bar's images (to indicate the user's location in the site) and update the contents of another frame. But if the user returns to the previous page via the browser's Back button, the navigation bar will not automatically return to its previous condition. Similarly, if the user reloads the documents, the JavaScript will return the buttons to the default setting, stranding users in the middle of the site with a wrong impression of their true location.

This article presents a flexible solution to these problems that uses JavaScript to track the user's current location and automatically update the site's navigation tools. With this system, JavaScript's onload event handler can keep a JavaScripted navigation bar accurate and consistent.

A Working Example

To demonstrate this navigation system, we'll build a Web site for a fictional company, XYZ Services. The browser window for this Web site will be divided into two frames: one for navigation, and one for displaying company information.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2