PDA

View Full Version : Animated Collapsible DIV IE and Firefox problem



haytham2004
10-30-2007, 10:36 PM
1) Script Title: Animated Collapsible Div

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem:
First of all, thank you for taking the time to review my problem and thank you for creating the script. My problem is that when i pass values in an HTTP post method I get javascript error (status would say loaded but with errors on page) but when I call the page without any values passed it will work fine. Here is the http that gives me errors http://localhost/?function=1&id=b0d085cb6001f3f801fa42f68627c46b62793de3
The error refers to line 104 of the javascript which reads "if (document.cookie.match(re)) //if cookie found"
No problems show up if i just pass use localhost. Any ideas how to fix the problem. I need to be able to pass these values because when the user logs in these values are transfered into login.php which runs queries and then displays results on the user's home page that contain the collapsible div.
Thanks

ddadmin
10-31-2007, 05:48 AM
The script uses the page's URL as the name of the name/value pair within of the cookie used to persist it. In most cases, it's a good idea, but not so much if your URL consist of long parameter strings. Do the parameters (ie: function=1&id=xxxxxx) in your case cause different pages to load?

haytham2004
10-31-2007, 08:49 PM
Thanks for the quick response. Great customer service. The answer to your question is yes. The function value defines the script to run and the id is user specific used to load user specific data. I guess what I need to do is change the way the "name" variable is created when the function is called (which is at the begining of the javascript). Would you have any suggestion on what the code for the name should look like?
Thanks

ddadmin
11-01-2007, 08:06 AM
See this thread: http://www.dynamicdrive.com/forums/showthread.php?t=25974