HTML
  Home arrow HTML arrow Page 4 - Functions for 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

Functions for a Menu for All Browsers
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-06-03

    Table of Contents:
  • Functions for a Menu for All Browsers
  • Names of the Functions and their Roles
  • The dropDownMenu() Function Details
  • The remove3NumID() Function Details
  • The remove2NumID() Function Details

  • 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


    Functions for a Menu for All Browsers - The remove3NumID() Function Details


    (Page 4 of 5 )

    Let us talk about the remove3NumID() function and then the remove2NumID() function before we talk about the react() function. The remove3NumID() function removes any sub menu whose number part of the table ID is made up of three digits. This is the function:


    function remove3NumID()

    {

    for (i=0;i<5;i++)

    {

    for (j=0;j<5;j++)

    {

    for (k=0;k<5;k++)

    {

    //form ID

    theID = 'ST' + i + j + k;

    if (document.getElementById(theID))

    {

    document.getElementById(theID).style.visibility = "hidden";

    document.getElementById(theID).style.display = "none";

    }

    }

    }

    }

    }



    This function is called only under special circumstances. There are three for-loops. Each for-loop is for one digit. Each for-loop iterates from the index number zero to the index number 4. These five iterations are for the maximum of five menu items that our example can have for a sub menu. All the statements are in the innermost for-loop.

    IDs of all possible three-digit combinations for our example are formed as the program goes through the three for-loops, from index zero to 4. The first statement in the inner for-loop forms the ID. The next statement first checks if that ID exists (for our example). If it does, then two statements are executed. The first of the two statements gives a value of "hidden" to the visibility property of the corresponding table. The second statement removes the table by giving the value of "none" to the display property of the table.

    The first statement (hidden) is not really necessary. However, if you do not have it, Internet Explorer may not remove the table. The other browsers do not need the statement.

    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 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek