Results 1 to 2 of 2

Thread: Animated Collapsible DIV - Toggle breaks after ASP.NET AJAX update

  1. #1
    Join Date
    Jun 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Animated Collapsible DIV - Toggle breaks after ASP.NET AJAX update

    1) Script Title: Animated Collapsible DIV

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

  2. #2
    Join Date
    Aug 2004
    Posts
    9,893
    Thanks
    3
    Thanked 966 Times in 954 Posts
    Blog Entries
    15

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •