Log in

View Full Version : Switch Menu not collapsing



neo_philiac
10-23-2008, 01:29 PM
1) Script Title: Switch Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm

3) Describe problem:

So, I am using the this menu and it is working fine. But when I go back to the home page the menu is still expanded. It doesn't collapse. How do I re-initialize the menu?

Thanks

ddadmin
10-23-2008, 06:54 PM
Looks like the same problem as this user's: http://www.dynamicdrive.com/forums/showthread.php?t=37852

neo_philiac
10-24-2008, 01:00 PM
Thanks for your reply. See this is actually not what I had in mind. I want the menu to be expanded when in the sub-menu pages but want it to collapse when in the index page. So, obviously it has to be page dependent. I could do it the hard way by making the menu for each page (the way usually it is done!) but I want a smart menu to recognize the page and stay expanded when needed. Am I making sense? I have switched between local and sitewide but not what I want. :D

Thanks

neo_philiac
10-24-2008, 02:24 PM
OK guys!

I think I have figured out a way :D. All my pages are in php and what I have done is pass the 'persistmenu' with every page every time I call the javascript. so for index persistmenu=no and for sub-menu persistmenu=yes . Everything works perfectly except for the first time. The first time I click the sub-menu it collapses but after that it stays expanded when in the submenu but collapses when I click the index or any other page. Any idea????