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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with multi level menu

    Hello i have a menu list, its working, it shows the list when i click on a menu item, under a menu item are sub items, and more sub items.

    I want that when i click on a other main item that the other will close. Now it still keep open and then ill get a long menu list.

    How do i do it , i dont have js experience.

    Script:

    <script type="text/javascript">
    function haalop()
    {
    var locmain = iframe.location.href;
    alert("hallo");
    var deurl = "MTV/nieuweverstuurMTV.html#"+locmain;
    alert(deurl);
    parent.iframe.location.href = deurl;
    }
    </script>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function Show_SubMenu(Click_Menu)
    // Function that will swap the display/no display for
    // all content within span tags
    {
    if (Click_Menu.style.display == "none")
    {
    Click_Menu.style.display = "block";
    }
    else
    {
    Click_Menu.style.display = "none";
    }
    }
    -->
    </script>



    ---------------------------------------------
    A little piece of code of my list.

    <ul>
    <li>
    <a href="javascript:Show_SubMenu(algemeen)"><b>Algemeen</b></a>
    <ul ID="algemeen" style="display: none"><li><a href="javascript:Show_SubMenu(alg_zbw)">Zorg, Behandeling en Welzijn</a>
    <ul ID="alg_zbw" style="display: none"><li><a href="javascript:Show_SubMenu(alg_zorg)">Zorg</a>
    <ul ID="alg_zorg" style="display: none"><li><a href="......" target="iframe">Werkinstructies</a>
    </li>
    <li>
    <a href="..........." target="iframe">Protocollen</a>
    </li>
    <li>
    <a href=".........." target="iframe">Formulieren</a>
    </li>
    <li><a href=".......</a>
    </li>
    <li>
    <a href="......." target="iframe">Overigen</a>
    </li>
    </ul>
    </li>

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    I'd recommend you to check http://htmldog.com/articles/suckerfish/dropdowns/, which is a good resource to learn the making of drop downs.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Need help please... i ve visit all tutorials on internet


  •  

    Posting Permissions

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