MikeHunt
08-28-2007, 10:37 AM
1) Script Title: Animated Collapse
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem:
I am using a series of collapsible divs to display data via an AJAX. When the user first clicks on the div, it expands and a loading progress bar is shown. The data is retrieved, and when the request is complete I replace the loading progress bar in the div with the retrieved content (using innerHTML in JS). I have the div set at 175px tall (an average size for the dynamic content), and if the content coming back is larger, I adjust the height. This works 75% of the time.
The issue is if the html is much larger than 175px, let's say 400px. When the content comes, back the panel only expands to about 75% of the content's height, leaving the rest cut off. I've debugged this thing like crazy, only to come up with no real solution. The weird thing is if I force the request to take an extra second before returning the data, the div always expands to the full height of the content. Very strange.
Any ideas on how to approach this?
Thanks,
Mike
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem:
I am using a series of collapsible divs to display data via an AJAX. When the user first clicks on the div, it expands and a loading progress bar is shown. The data is retrieved, and when the request is complete I replace the loading progress bar in the div with the retrieved content (using innerHTML in JS). I have the div set at 175px tall (an average size for the dynamic content), and if the content coming back is larger, I adjust the height. This works 75% of the time.
The issue is if the html is much larger than 175px, let's say 400px. When the content comes, back the panel only expands to about 75% of the content's height, leaving the rest cut off. I've debugged this thing like crazy, only to come up with no real solution. The weird thing is if I force the request to take an extra second before returning the data, the div always expands to the full height of the content. Very strange.
Any ideas on how to approach this?
Thanks,
Mike