View Full Version : How To Run Two Instances of Switch Menu I?

09-02-2006, 06:29 PM
1) Script Title: Switch Menu I

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

3) Describe problem:
I would like to run two instances of Switch Menu that are completely independent of each other. The first instance of the script uses the exact same code as the instructions of the script URL, however, when I want to use a second switch menu script that is completely independent of the first, what variable changes do I have to make? What parts to I have to edit? What do I need to do to keep persistance for both switch menus? I would really appreciate it. Thanks!

09-02-2006, 06:49 PM

09-02-2006, 07:02 PM
I understand and I dunno if this makes it easier or not, but I have changed ALL variable names and they both work perfectly except for the persistance part which I believe deals with cookies. If someone can help me out with this, I'd really appreciate it.

09-03-2006, 04:13 AM
Two unique cookies need to be used with uniquely named data. Post a link to your page if you need more help.

09-18-2006, 08:51 AM

Am also trying to implement 2 switchmenu on the same page. I've changed variables. Persistence works for only one of the menu but not the second one.

I know there must be something to be done with the following block of code:

if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)

if (persistmenu=="yes" && document.getElementById)

Here's the link to the page am implementing:
For categories, its ok but not for brands

If anyone can help me up there?