PDA

View Full Version : smart folding tree script question in persistance



caws1111
12-19-2004, 08:15 PM
I am using the script posted here

http://www.dynamicdrive.com/dynamicindex1/navigate1.htm

I wanted to have persistent menus even when navigating within the same site and was not sure how to "turn" this feature on.

also when I put a link on a top level menu item, for instance on the exmaple "news", the menu will not open up to items below it.

Can anyone help with this? I have checked the threads and cant find a previous question like this one.

ddadmin
12-21-2004, 12:38 AM
Regarding the persistance across site question, basically it comes down to modifying the cookie value that gets set so the name in the name/value pair is a static, unified one. Anyhow, what this means is that you can try doing the below to achive persistance across site:

1) Do a search and replace, by changing all occurences of the word:


window.location.pathname

to:


"folderpersist"

Note the quotations surrounding the modified value that needs to be included when replacing.

2) Then, change the line:


document.cookie="folderpersist"+"="+openones

to:


document.cookie="folderpersist="+openones+";path=/"

That should work, although I haven't actually tested it.

KCMayer
03-09-2005, 02:11 PM
Thank you so much for taking the time to provide this solution. This is exactly what I needed and took me less than 5 minutes to implement...

K :)