JavaScript
  Home arrow JavaScript arrow Page 4 - Bulleted Menu of Links
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? 
JAVASCRIPT

Bulleted Menu of Links
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-04-23

    Table of Contents:
  • Bulleted Menu of Links
  • Operation from the User’s Point of View
  • Algorithm
  • Code continued
  • Even More Code

  • 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


    Bulleted Menu of Links - Code continued


    (Page 4 of 5 )

    {

    //var string11 = "<li onclick="formString('SLL11')" id="SLLLI11" style='list-style-type: disc'
    title="Click Bullet to Expand"><a href='www.somePage11.com' id="SLL11" title='Click Bullet to Expand'>Second Level Link 11</a></li>";

    var string111 = "<li><a href='www.somePage111.com' style='list-style-type: square'>Third Level Link 111</a></li>";

    var string112 = "<li><a href='www.somePage112.com' style='list-style-type: square'>Third Level Link 112</a></li>";

    var string113 = "<li><a href='www.somePage112.com' style='list-style-type: square'>Third Level Link 113</a></li>";

    //var string12 = "<li onclick="formString('SLL12')" id="SLLLI12" style='list-style-type: disc'
    title="Click Bullet to Expand"><a href='www.somePage12.com' id="SLL12" title='Click Bullet to Expand'>Second Level Link 12</a></li>";

    var string121 = "<li><a href='www.somePage121.com' style='list-style-type: square'>Third Level Link 121</a></li>";

    var string122 = "<li><a href='www.somePage122.com' style='list-style-type: square'>Third Level Link 122</a></li>";

    var string123 = "<li><a href='www.somePage123.com' style='list-style-type: square'>Third Level Link 123</a></li>";

    //var string13 = "<li onclick="formString('SLL13')" id="SLLLI13" style='list-style-type: disc'
    title="Click Bullet to Expand"><a href='www.somePage13.com' id="SLL13" title='Click Bullet to Expand'>Second Level Link 13</a></li>";

    var string131 = "<li><a href='www.somePage131.com' style='list-style-type: square'>Third Level Link 131</a></li>";

    var string132 = "<li><a href='www.somePage132.com' style='list-style-type: square'>Third Level Link 132</a></li>";

    var string133 = "<li><a href='www.somePage133.com' style='list-style-type: square'>Third Level Link 133</a></li>";


    //verify which list item was clicked and give its global variable its value

    switch(ID)

    {

    case "FLL1":

    if (FLL1Direction == "Expand")

    {

    FLL1Direction = "Collapse"

    }

    else if (FLL1Direction == "Collapse")

    {

    FLL1Direction = "Expand"

    }

    else //the first time the link it clicked.

    {

    FLL1Direction = "Expand"

    }

    break;

    case "SLL11":

    if (SLL11Direction == "Expand")

    {

    SLL11Direction = "Collapse"

    }

    else if (SLL11Direction == "Collapse")

    {

    SLL11Direction = "Expand"

    }

    else //the first time the link it clicked.

    {

    SLL11Direction = "Expand"

    }

    break;

    case "SLL12":

    if (SLL12Direction == "Expand")

    {

    SLL12Direction = "Collapse"

    }

    else if (SLL12Direction == "Collapse")

    {

    SLL12Direction = "Expand"

    }

    else //the first time the link it clicked.

    {

    SLL12Direction = "Expand"

    }

    break;

    case "SLL13":

    if (SLL13Direction == "Expand")

    {

    SLL13Direction = "Collapse"

    }

    else if (SLL13Direction == "Collapse")

    {

    SLL13Direction = "Expand"

    }

    else //the first time the link it clicked.

    {

    SLL13Direction = "Expand"

    }

    }

    More JavaScript Articles
    More By Chrysanthus Forcha


       · There are so many elements of bad practie put forward within this article. Using...
       · If you want the links of your web page to appear like the folder tree in Windows...
     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







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