PDA

View Full Version : Persistance of Animated Collapse in iframe



shadow99
11-10-2007, 03:08 PM
1) Script Title: Animated Collapsible DIV

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

3) Describe problem:
G'day

I have made extensive use of the animated collapse script on a project I am working on. It works fine except in one scenario. Persistence of the state is not working when the div is within an iframe.

That is,
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("dog", 1000, true)

This persist function works perfectly well when not calling the script from an iframe.

Any help will be very much welcome! (please!)

Many thanks

ddadmin
11-11-2007, 08:32 AM
Is the page contained within the iframe within your own domain as well? I ask this because if not, cookies won't work (cross site) out of the box. Depending on how things are set up, I can provide more info.

shadow99
11-12-2007, 01:07 PM
yes, both pages are in the same domain, they are all part of one ASP .NET website project.

ddadmin
11-13-2007, 11:21 PM
Then it should work. I just tested this out, where the entire script and the DIV to animate is saved as a separate page (ie: animate.htm), and loaded as an IFRAME on the page:


<iframe src="animate.htm" style="width: 300px; height: 300px"></iframe>

The persistence still works. Are you using a different set up? Perhaps a link to the problem page would be helpful.

shadow99
11-14-2007, 07:24 PM
thanks, script is now working, not sure what went wrong, but seems to be all OK now.