Results 1 to 3 of 3

Thread: Updating Open Menu from External link - Cookie?

  1. #1
    Join Date
    Jul 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Updating Open Menu from External link - Cookie?

    1) Script Title:
    Accordion Menu script (v1.7.1)

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ordionmenu.htm

    3) Describe problem:

    I've got the menu working correctly and everything is great.
    However, I also have other links which are outside the accordion menu which go to the same pages within.

    I'm using persistent menu's so when I jump into these pages from these link outside the accordion, the previous menu selected when last used the accordion is open.

    I'm assuming I need to somehow update the cookie with the new location on the link... but no entirely sure how to do this.

    Any help would be great.

    Many thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm not sure I fully understand what you're asking actually. If you're asking how to have a particular accordion menu header expanded based on the referring page's URL, you can use the "URL parameter feature" (bottom of page) of the script (by adding ?headerclass=whatever) to the referring page's URL if you have access to the referring page. If not, you may be able to use the oninit() event handler of the script, along with JavaScript's document.referrer property, to try and detect the referring page's URL, and expand a header accordingly.
    DD Admin

  3. #3
    Join Date
    Jul 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Great stuff!
    Thanks a lot.

    I put the URL parameter on the external links and it worked all perfectly.

    Thanks again

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
  •