PDA

View Full Version : Switch Menu I and Cookies



developer82
04-12-2006, 01:48 PM
Hello,

I'm using the Switch Menu I script with three levels (thanks to jscheuer1) --http://www.dynamicdrive.com/forums/showthread.php?t=2166

This is the first time I'm using cookies, so bear with me :) Currently if one of your top most levels is linked to a page and has no subs, there is no way to create a cookie. THis poses a problem when you have previously been in a section with subs, and then you click on on the top item with no subs -- the subs of the previous section will still be visible. Is there a solution for this??

For example:
Top 1
Sub 1
Sub 1a
Sub 1b
Sub 2
Sub 3
Top 2
Top 3
Sub 1
Sub 2

If you click first on Top1, then Sub 1 which expands 3rd level subs.... and then you click on Top 2 which has no subs, then the Top2 page will load, however the Top1 subs will still be visible. Please Help!

THank you! Thank you!

developer82
04-12-2006, 01:50 PM
Ooops I see my indenting didn't work, so this is what I was trying to achieve:

Top 1
---Sub 1
------Sub 1a
------Sub 1b
------Sub 1c
---Sub 2
---Sub 3
Top 2
Top 3
---Sub 1
---Sub 2

developer82
04-12-2006, 03:27 PM
I hope I'm clear explaining what I'd like to do...

Essentially, is there a way to set/pass a cookie in a link? This way there will be a new cookie, so that the other subs collapse. AND That way if I create a link on a different page, then when the user clicks on that link, the menu will expand to appropriate section.

I hope this makes sense. and I hope someone can help! :)