PDA

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



Crimsonbat
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!

blm126
09-02-2006, 06:49 PM
http://www.dynamicdrive.com/forums/showthread.php?t=320

Crimsonbat
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.

jscheuer1
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.

ravisatan
09-18-2006, 08:51 AM
Hi,

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)
window.onload=onloadfunction

if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate

Here's the link to the page am implementing:
http://www.camerastock.com/files/template_test.php
For categories, its ok but not for brands

If anyone can help me up there?