HTML
  Home arrow HTML arrow React and ToChoose Functions for a Menu fo...
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

React and ToChoose Functions for a Menu for All Browsers
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2009-06-10

    Table of Contents:
  • React and ToChoose Functions for a Menu for All Browsers
  • The Parameters of the react() function
  • The toChoose() Function
  • The toChoose() Function Continued

  • 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


    React and ToChoose Functions for a Menu for All Browsers


    (Page 1 of 4 )

    Welcome to the sixth part of a nine-part series that shows you how to build a menu for all browsers. In this part we continue to take a look at the JavaScript functions, specifically the react() and toChoose() functions.

    The react() Function Details

    The arguments for this function are not really the ones we saw in the previous series. This function is called when the mouse pointer goes over a drop down menu or sub menu item. Each of the cells for these items has an onmouseover event attribute. One of attributes is:

    onmouseover = "react('TD11','1','sub','5')"


    Now let us look at the function. Here it is:


    function react(ID,colNo,submenu,noRows)

    {

    //first make sure all background colors of the sub menu cells are brown.

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

    {

    //form the ID

    theID = "TD" + i + colNo;

    document.getElementById(theID).style.backgroundColor = "brown";

    }


    //let the background of the current sub menu cell be firebrick.

    document.getElementById(ID).style.backgroundColor = "firebrick";


    //remove any lower sub menu that was displayed before you display the new one

    if (ID.length == 4)

    remove2NumID();

    else if (ID.length == 5)

    remove3NumID()


    //display sub menu

    if (submenu == "sub")

    {

    //ID of sub table

    beginslice = 2;

    endslice = ID.length;

    slicedStr = ID.slice(beginslice,endslice);

    IDSUB = 'ST' + slicedStr;

    document.getElementById(IDSUB).style.display = "block";

    document.getElementById(IDSUB).style.visibility = "visible";

    }


    }


    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 3 Hosted by Hostway
    Stay green...Green IT