PDA

View Full Version : Accordion Content not persisting between pages



jsantari
02-05-2008, 09:05 PM
1) Script Title: Accordion Content Script

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

ddadmin
02-05-2008, 09:42 PM
It could be a cookie path issue. Inside ddaccoridion.js, try changing this line:


document.cookie = name + "=" + value

to:


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.

Toccamonium
06-03-2008, 03:48 PM
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?

ddadmin
06-04-2008, 01:35 AM
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.

Toccamonium
06-04-2008, 06:11 AM
Ok, I have to setup another demo site with an example. I will inform you...

Toccamonium
06-04-2008, 12:17 PM
Ok, problem solved. There was a php session func included which caused the
trouble. Commenting this out solved the problem.

thanks anyway :)