View Full Version : Smart Folding Menu Tree Script - help?

12-12-2005, 12:55 AM
Hi guys,

I've been using this script: Smart Folding Menu Tree Script (http://www.dynamicdrive.com/dynamicindex1/navigate1.htm)

And it's working fantastically, bar for one tiny thing I'm hoping someone can change - when the user selects an option, the tree unfolds. If they select another option, the next bit of the tree unfolds, and the first selection remains open as well. If a user goes and opens all of the options, the menu ends up going faaaar down the page.

Is there any way to make the initial selection close once the user selects a second option?

Thanks for any help,

12-12-2005, 03:03 AM
This script cannot easily be adapted to do that, if at all. There is another script here at DD, the Switch Menu (http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm) that already works like that. I once adapted it to look like the Smart Folding Menu Tree Script. That mod can be found here (http://www.dynamicdrive.com/forums/showpost.php?p=8108&postcount=6).

12-12-2005, 03:26 AM
Thanks for the info...I was using the Switch Menu (http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm) originally, but I didn't find any way to enable more than 2 levels of navigation...I think your second link has fixed it though :) thank you! I'll try it and get back if I have any problems.

Edit: Okay, looks good, except for one thing. It wants to have fold.gif, open.gif etc defined, and whenever you click on one of my images, there's a X. I'm not using the images provided in the SMFT script...or any other 'bullet' images at the front of the list...I've got this sort of thing:

<ul align=center>
<li id="foldheader"><img src="images/products.gif" srcover="images/products_over.gif"></li>
<ul id="foldinglist" class=none style="display:none" style=&{head};>
<li id="foldheader"><img src="images/nav/3dmodelling_off.gif" border=0 srcover="images/nav/3dmodelling_on.gif" width=162 height=22></li>
<ul id="foldinglist" class=none style="display:none" style=&{head};>
<li><a href="javascript:load('ais.html')"><img src="images/nav/ais_on.gif" border=0 srcover="images/nav/ais_off.gif" width=162 height=22></a></li>
<li><a href="javascript:load('aip.html')"><img src="images/nav/aip_on.gif" border=0 srcover="images/nav/aip_off.gif" width=162 height=22></a></li>

so basically I have images representing the words for the menu.

Your modification looked perfect, it had 3 levels and it was collapsing a level once a user had selected another heading...but I can't get my head around the images thing.

So, is there a way to edit your second code, so that you can use images instead of words as menu buttons?

Thanks for any help,

12-12-2005, 04:40 AM
That being the case, your not wanting the folder images, you really just want a switch menu with added depth that you can then substitute images for the text. I made one of those up as well, here (http://www.dynamicdrive.com/forums/showthread.php?t=2166). You will need to start with a fresh copy of switch menu, mod it up as per the instructions in that thread, then change the text headers to your images.

12-12-2005, 05:52 AM
Perfect. Thank you :)