HTML
  Home arrow HTML arrow Making a Common Browser Menu React
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

Making a Common Browser Menu React
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-04-03

    Table of Contents:
  • Making a Common Browser Menu React
  • Third Code Segment of the react() Function
  • Details of the react() Function
  • The Fourth Code Segment: 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


    Making a Common Browser Menu React


    (Page 1 of 4 )

    Welcome to the fifth part of a ten-part series that shows you how to make a drop-down browser menu that works on multiple browsers. In this part of the series, we begin an in-depth analysis of the react() function, which is the function that responds to the onmouseover event for each table cell.

    The react() Function Code Segments

    When the mouse pointer is over a table cell having a SPAN element displayed, the react() function changes the background color of the table cell from brown to firebrick. While in the column, if the mouse pointer goes over another similar cell, the background of the former cell should return to brown, while that of the present cell should become firebrick.

    If the SPAN element of the present cell has the ‘>’ character, the react() function displays the sub menu whose root is the present cell. If the mouse pointer goes on to another cell of the present column, the sub menu developed from the ‘>’ above should disappear. This function can produce sub menus of different levels that are related by moving the mouse pointer onto lower sub menus on items that have the ‘>’ characters.

    There are seven code segments in this function. The first six are inside an if-statement. The last one is outside the if-statement. As you know, for any SPAN element that is displayed, the background color of its table cell is made brown. Any of the six segments in the if-statement will only have an effect if the background color of the cell the mouse is on is brown, meaning that a SPAN element in the cell is displayed. So any of the six segments will only have an effect for a cell if that cell has a SPAN element displayed.

    The First Code Segment

    This segment gets the column number of the cell in the table from the tdID parameter (whose argument has the ID of the table cell). We need this column number later.

    The Second Code Segment

    As we said above, when the mouse pointer is over a cell whose background color is brown, the background color will be made firebrick. Now, if the mouse pointer goes over another cell whose background color is brown in the same column, the firebrick color of the previous cell has to be turned back to brown. The segment turns all the background colors in the column to brown. By doing this, the background color of the previous cell is turned to brown. More details on this later!

    More HTML Articles
    More By Chrysanthus Forcha


     

    HTML ARTICLES

    - Hello HTML 5, Goodbye Gears
    - 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







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