...

View Full Version : Help with multi level menu



Masterscr
05-19-2009, 01:19 PM
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>

abduraooft
05-19-2009, 01:22 PM
I'd recommend you to check http://htmldog.com/articles/suckerfish/dropdowns/, which is a good resource to learn the making of drop downs.

Masterscr
05-19-2009, 03:42 PM
Need help please... i ve visit all tutorials on internet :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum