PDA

View Full Version : javascript problem



xiaodao
11-20-2005, 03:17 AM
hi,
i got a script from dynamicdrive, its name is smart fold tree menu

i used in following page

http://www.mizuwork.com/mishow/sort.php

please view source to see the codes

however when i try to click on the main menu to get sub menu, the submenu disappear once when the mouse is over it. please help, how to solve

jscheuer1
11-20-2005, 03:38 AM
You cannot make a foldheader be a link, like you have here:


<a href="sort.php?cat=1"><li id="foldheader">he he</li></a>

here:


<a href="sort.php?cat=3"><li id="foldheader">ho ho</li></a>

and here:


<a href="sort.php?cat=4"><li id="foldheader">co co</li></a>

If you do, what happens is that when you click it and the menu starts to open, it loads a new page or, in this case, a new version of the same page with a query string appended to the page name. As the new version of the page loads, all menu trees revert to their onload state, which is closed.

If you add the persistence feature (step4 from the demo) you should be able to do it the way you have it but, to what end?