JavaScript
  Home arrow JavaScript arrow Making a Dynamic Navigation Bar in JavaScr...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Making a Dynamic Navigation Bar in JavaScript Degrade Gracefully
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 3
    2007-06-27

    Table of Contents:
  • Making a Dynamic Navigation Bar in JavaScript Degrade Gracefully
  • Creating a simple navigation bar
  • An example: a fictional web page
  • Extending the implementation of the JavaScript-based navigation bar

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Making a Dynamic Navigation Bar in JavaScript Degrade Gracefully


    (Page 1 of 4 )

    The modern trend aimed at building highly interactive and visually appealing web sites can introduce undesirable effects, particularly in those cases where JavaScript is used erroneously to display relevant content to end users. Therefore, if you're interested in learning how to make your JavaScript applications degrade gracefully when scripting has been disabled in the client, then this series of articles might be what you're looking for.

    Introduction

    Welcome to the second installment of the series that began with "Making JavaScript Applications Degrade Gracefully." Made up of three approachable tutorials, this series shows you how to use JavaScript to expand the existing functionality of a given web application without turning it into a piece of software that depends on client-side scripting to work properly.

    Stepping back for a moment to the topics covered in the preceding article of this series, you'll surely recall that in that tutorial particularly I explained how to build a simple online registration form which was comprised of a few text input fields. These fields are of course handy for entering useful data, such as the user's first and last names, the pertinent email address, and some additional comments. Besides, the web form was conceived originally to display a combination of two combo boxes, where the second one would be displayed on the browser only if a specific option was selected in the first one.

    Logically, the implementation of this basic yet interactive online form was used only as an introductory approach to demonstrate how to build JavaScript applications that degrade gracefully in those cases where scripting has been disabled in the client. In this occasion in particular, the functionality provided by the aforementioned registration form would remain nearly the same, even if a user can't select the options available in the second combo box.

    So far so good. Now that you hopefully recalled the concepts deployed in the previous tutorial of the series, it's a good time to leap forward and continue reviewing more real-world examples that surround the development of JavaScript code that expands the existing capacity of a specific web application, but at the same time, doesn't limit its functionality if client-side scripting is deactivated on the browser.

    Speaking more concretely, in this second tutorial of the series, I'm going to demonstrate how to create a simple JavaScript application which can be used in conjunction with any conventional text-based navigation bar to indicate to the visitors of a hypothetical web site which page is currently active. Even though this example is actually rather primitive, it might be used as a starting point for developing more complex JavaScript applications that degrade gracefully, specifically in those situations where scripting has been disabled on the browser.

    Having already introduced the subject of this tutorial, let's get started! 

    More JavaScript Articles
    More By Alejandro Gervasio


       · Over the course of this second tutorial of the series, a simple dynamic navigation ...
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek