HTML
  Home arrow HTML arrow Page 2 - Concluding a Menu for All Browsers
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? 
HTML

Concluding a Menu for All Browsers
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating:  stars stars stars stars stars / 0
    2009-07-01

    Table of Contents:
  • Concluding a Menu for All Browsers
  • Important Attributes
  • Elaborated Layout Approach
  • Advantages of the Simple Layout Approach

  • 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


    Concluding a Menu for All Browsers - Important Attributes


    (Page 2 of 4 )

    The table cells have onclick and onmouseover event attributes. These events call functions in the JavaScript code passing the cell IDs and other arguments.

    The JavaScript Code

    There are four functions. The names of the functions and their roles are:

    The dropDownMenu() Function

    When you click a drop down button, this function is called. It displays a vertical sub menu below the main link preceding the drop down button you clicked. Before it does that, it first removes any other drop down menu or sub menus that were on the web page.

    The react() Function

    The background color of a main menu item and that of a sub menu item is brown. For simplicity, in my design the background color of a main menu item (in the horizontal bar) never changes even if the mouse pointer is over it. However, the background color of a sub menu item changes when the mouse pointer is over it.

    When the mouse pointer goes over any sub menu item on a drop down menu, the background color of the table cell of the menu item changes from brown to firebrick. Only one bar of firebrick color can be shown at a time on a sub menu. The react() function is responsible for all this.

    A sub menu item may have another sub menu, which would come out of its side when the mouse pointer is over the item. If the sub menu is not in the last column on the right of the table, then its sub (sub-sub) menu will come out of its right side. If it is in the last column, then its sub (sub-sub) menu will come out of its left side. The react() function is also responsible for this.

    Remember that in our design any sub menu item that can produce a sub menu has the ‘>’ character on its right. Again, in menu parlance you do not really talk about sub-sub and sub-sub-sub menus. All sub menus, independent of their level, are referred to simply as sub menus. You can use the phrase sub-sub or sub-sub-sub when you really want to be precise. You will hardly have to use such phrases.

    The react() function also makes sure that only the SPAN elements that are supposed to be displayed are displayed.

    The toChoose(ID) Function

    When a sub menu is displayed and you click outside the sub menu, the sub menu should disappear. This function sets a variable that is used for that control. We shall see the details later.

    The removeSubMenu() Function

    This function removes any sub menu (independent of the level) that is displayed. It uses the variable set above for this. We shall see the details for this function and the other three functions later.

    I used Internet Explorer, Mozilla Firefox, Netscape and Opera to test the complete code. So far as this series is concerned, Opera and Safari behave similarly to each other.

    More HTML Articles
    More By Chrysanthus Forcha


     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







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