PDA

View Full Version : Animated Collapsible DIV - Toggle breaks after ASP.NET AJAX update



grandeandy
06-17-2008, 06:34 PM
1) Script Title: Animated Collapsible DIV

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

3) Describe problem:

I have the collapsible DIV in an ASP.NET page. It is generated within an UpdatePanel. When I toggle the animated DIV collapse, it works just fine until the UpdatePanel refreshes, which redraws the DIV.

At this point, clicking the link to toggle the DIV no longer collapses or expands the DIV. I narrowed down the problem by adding a link that re-adds the DIV like so (something already done in the HEAD on page load):
animatedcollapse.addDiv('Convo', 'fade=1')
animatedcollapse.init()

When I click that second link to call adddiv, it can collapse and expand again. So clearly by redrawing the DIV I am losing that setting. The problem is that it shouldn't require this every time.

Any help of a fix for this would be GREATLY appreciated!

ddadmin
06-17-2008, 07:59 PM
I'm not familiar with ASP.net, but what your server is using for the backend shouldn't matter. The final output is what matters. When you say:


it works just fine until the UpdatePanel refreshes

Are you talking about a straightforward "reload" of the page, or does something change during the course? The former shouldn't "break" the script all of a sudden. Please post a link to the page on your site that contains the problematic script so we can check it out, and try and include the steps to take exactly to reproduce the problem.