Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2005
    Location
    Halifax, Nova Scotia, Canada
    Posts
    392
    Thanks
    1
    Thanked 0 Times in 0 Posts

    JavaScript Drop-down Nav Menu Recommendations

    I am looking for a JavaScript menu for my site that will enable me to set the links in an external file so that if I update the links in the future they will update across all pages on the site. I am looking for the basic drop down javamenu but it must be able to be placed inside a table element so that I can position it easily on my page. The idea is tables as follows:

    Code:
    +----------------------+
    | banner image         |
    +----------------------+
    | navigation menu      |
    +----------------------+
    | body content         |
    |                      |
    |                      |
    +----------------------+
    | footer               |
    +----------------------+
    Anyway, I know that there are a lot of options out there and I figured you guys would probably know the best of them.
    Once I thought I was wrong but I was mistaken.

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,465
    Thanks
    3
    Thanked 494 Times in 481 Posts
    with the simplest of menus

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
      <title></title>
    
    <script language="JavaScript" type="text/javascript">
    <!--
    // put this in an external JavaScript
    var LinkAry=new Array();
    LinkAry[0]='http://www.js-examples.com';
    LinkAry[1]='http://www.sitepoint.com';
    LinkAry[2]='http://www.codingforums.com';
    LinkAry[3]='http://www.vicsjavascripts.org.uk';
    //-->
    </script>
    
    
    <script language="JavaScript" type="text/javascript">
    <!--
    
    function Link(n){
     if (window['LinkAry']){
      window.top.location=LinkAry[n];
     }
    }
    
    //-->
    </script>
    
    </head>
    
    <body>
    <table width="500" border="1">
      <tr>
        <td>.</td>
        <td>.</td>
        <td>.</td>
      </tr>
      <tr>
        <td colspan="3" >
        <table width="100%" height="20" border="1">
          <tr>
            <td onclick="Link(0);">Link 0</td>
            <td onclick="Link(1);">Link 1</td>
            <td onclick="Link(2);">Link 2</td>
            <td onclick="Link(3);">Link 3</td>
          </tr>
        </table>
    
        </td>
      </tr>
      <tr>
        <td>.</td>
        <td>.</td>
        <td>.</td>
      </tr>
    </table>
    </body>
    
    </html>

  • #3
    Regular Coder
    Join Date
    Jul 2005
    Location
    Halifax, Nova Scotia, Canada
    Posts
    392
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks, that is really neat but it won't really do drop downs for say two tiers or anything right? I think I may have a script but the real trouble is just that the fellow I need the script for doesn't jive with CSS otherwise we'd just use a CSS drop down menu.
    Once I thought I was wrong but I was mistaken.

  • #4
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    What about the ones in http://www.twinhelix.com ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •