Results 1 to 5 of 5

Thread: How To Run Two Instances of Switch Menu I?

  1. #1
    Join Date
    Mar 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How To Run Two Instances of Switch Menu I?

    1) Script Title: Switch Menu I

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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!

  2. #2
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

  3. #3
    Join Date
    Mar 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Two unique cookies need to be used with uniquely named data. Post a link to your page if you need more help.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default implementing 2 instances of switch menu in single page

    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?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •