Home arrow HTML arrow Page 2 - More on the React Function for a Common Browser Menu
HTML

More on the React Function for a Common Browser Menu


Welcome to the sixth part of a ten-part series on building a common browser menu. We continue in this part with the in-depth analysis of the react() function. As you may recall, in the last part we noted that the function was composed of five code segments, and began analyzing them. In this part, we shall complete the details of the react() function's fourth code segment and talk about the fifth code segment.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
April 10, 2009
TABLE OF CONTENTS:
  1. · More on the React Function for a Common Browser Menu
  2. · The Fifth Code Segment Details
  3. · Code for the Fifth Code Segment
  4. · More on the Fifth Code Segment

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
More on the React Function for a Common Browser Menu - The Fifth Code Segment Details
(Page 2 of 4 )

This segment does not do anything to the menu that is dropped down by clicking the drop down button. A sub menu simply displays the SPAN elements of certain cells in a column; it also changes the background colors of these cells to brown. Consider the following attribute in a sub menu table cell:

onmouseover="react('TD31','','','')"


The name of the react() function with its parameters is:


react(tdID,spanArr,subColNo,rootArr)


The call in the above attribute sends only the ID of the cell the attribute is in. For the other three arguments, an empty string, ‘’ is sent. These three parameters are used with sub menus. When the react() function receives a call with these three arguments empty, it does nothing to a sub menu that is developed from a drop down menu.

The fifth code segment produces a sub menu directly from a drop down menu cell. You, the designer, have to know the cell that has a SPAN element with a ‘>’ character requires a sub menu from the present cell (in the drop down menu). In this case your attribute in the cell requiring a drop down menu is something like this:


onmouseover="react('TD11',['11'],'2','')"


The first argument in the call is the ID of the cell the attribute is in; you, the designer, have to know this as you are designing. The second argument is an array. The array here has only one element. This element is the number part of the ID of the SPAN element that has the ‘>’ character; you, the designer, have to know this.

The next argument is the column number on the side of the drop down menu. This will always be the next column on the right. If your present cell is in the drop down menu that is the last column, then this number should be the number of the last but one column, since the new sub menu has to be produced on the left. The last argument is an empty string. This last parameter (argument) is needed when you want a sub menu of a lower level.


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials