HTML
  Home arrow HTML arrow Page 4 - 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 - The toChoose() Function Continued


    (Page 4 of 4 )

    Now let's look at the peculiarities. First, know that you can set the cell background color of any of the five browsers we are using (to test the code), using the name of the color (e.g. brown or firebrick). However, when you ask the browsers to return the cell background color, they return the color in different ways.

    Internet Explorer, Mozilla Firefox and Netscape return the name of the color. This is what is convenient and it is what we like.

    Opera returns the color in hexadecimal form and with small alphabet letters (e.g. #b22222).

    Safari returns the color in rgb-decimal form (e.g. rgb(178, 34, 34)).

    In order to take account of these three different situations (color by name, color by hexadecimal or color by rgb-decimal), the if-condition tests for these three different return types, using an or-expression. Look at the if-condition in the code earlier in this article to appreciate what I have just said.

    So the particularity of the Internet Explorer, Mozilla Firefox and Netscape browsers has been taken into consideration. The particularity of Opera (and any other browser that may behave like it, forming a group) has been taken into consideration. And lastly, the particularity of Safari (and any other browser that may behave like it, forming a group) has been taken into consideration.

    Fortunately, the code segment for this is very short, and it is as if all of our code works with all browsers.

    Let us take a break. In the next part we shall look at the last of the JavaScript functions.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

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