PDA

View Full Version : (Animated Collapsible DIV) Remember Cookie until DIV is updated



house
07-25-2008, 10:26 AM
1) Script Title:
Animated Collapsible DIV v2.01

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

3) Describe problem:

hi,

first off: love the script; kudos to the developer.
now to my problem...

i am using the collapsible div as some sort of "push update", that is, one-liner get displayed and can then be clicked away by the user.

what i would like to do is set a cookie which "remembers" the collapsed state of the div all the time until i update the div with new content.
is this possible?

regards and thanks in advance,

house

ddadmin
07-25-2008, 10:13 PM
Well, persistent cookies in JavaScript is certainly possible, but the real question is how you plan to notify the script that a DIV should be collapsed and for how long. It's as much about how the rest of your system works as it is about the collapsible script itself.

house
07-26-2008, 09:18 AM
so... possible?

what i basically would like to have is a system similiar to 37signals backpackit...
the have this announcements where you can collapse the div until the next announcement.

ddadmin
07-26-2008, 05:16 PM
Well it's possible as mentioned, but exactly how to do this is also dependent on how the announcements are being pushed. In other words, it's not a matter of modifying Animated Collapsible DIV itself with a new feature. This part can be considered an independent feature:


what i would like to do is set a cookie which "remembers" the collapsed state of the div all the time

but certainly not this part without first having some way to inform the script that new content has been served:


until i update the div with new content.

house
07-26-2008, 08:16 PM
alright...
is there any way you could implement this for me or is it just too much work/time consuming/... ?

ddadmin
07-26-2008, 09:51 PM
The complexity really depends on the other half of your equation- that is, how you're updating the DIVs with new content, either manually, or server side. You'll need to provide details on that.

house
07-27-2008, 10:13 AM
actually i was thinking about just doing it manually, that is edit the div right on the server...

house
08-02-2008, 08:44 PM
no offense, but are you going to do that or did you move on?
sounded like you were going to code this...