Results 1 to 6 of 6

Thread: Accordion Content not persisting between pages

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

    Default Accordion Content not persisting between pages

    1) Script Title: Accordion Content Script

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

    3) Describe problem:

    I have integrated the accordion script into a CMS I've built and it does not want to persist its state when I go to another dynamic page. Ex; if I go to index.php?pid=2 (where 2 is the db id of the content page that runs the accordion) the accordion displays just fine with no panels intially open as it is set for this. If I open a panel and then do a refresh the correct panel is still open. However, if I click on a link and go to index.php?pid=3 and then click on the link to go back to index.php?pid=2 the panel that was open is not remembered and it resets back to the intial default state. Any ideas as to why?

    Thanks,
    Jim

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

    Default

    It could be a cookie path issue. Inside ddaccoridion.js, try changing this line:

    Code:
    document.cookie = name + "=" + value
    to:

    Code:
    document.cookie = name + "=" + value + "; path=/"
    If that doesn't work, please post a link to the page on your site that contains the problematic script so we can check it out.

  3. #3
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have the same issue. Using it in the CMS TYPO3 it doesn't really work.
    With every new page the status is different. Sometimes the same but
    quite often totally different. Any basic idea what could cause browser
    cookie problems?

    As we need a working persistant state, I was also testing this menu
    http://www.udm4.com/demos/expanding-multiple.php
    Here the cookie functions is working correctly also in a CMS. Unfortunately
    it's not in the jquery framework so I getting a lots of extra js

    I'm not a javascript developer but perhaps it's possible to access to
    the jquery cookie plugin?
    Last edited by Toccamonium; 06-03-2008 at 04:25 PM.

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

    Default

    Tocca, please post a link to the problem page on your site. It might help to see the structure of your URLs in determining why the cookies for Accordion Content aren't being set correctly.

  5. #5
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, I have to setup another demo site with an example. I will inform you...

  6. #6
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, problem solved. There was a php session func included which caused the
    trouble. Commenting this out solved the problem.

    thanks anyway

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
  •