pcoles
11-03-2006, 06:03 PM
1) Script Title: Switch Content Script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
I am trying to use the Switch Content Script on a set of search results that gets dynamically placed into the search results DIV. This way users can see more results on one page and expand them if they want to see more.
My problem is that the collapsing does not work when I add these results after the page has initially loaded. For example, I have a function called "submit()" that will populate the window with search results. If I call submit within the HTML for the page, the results will populate properly and collapse/expand on clicking. However, if I modify the page to run "submit()" as the result of clicking on a button on the page, the collapse/expand functionality no longer works.
To make things more interesting, if I add collapsible/expandable content within the HTML of the page, and then call "submit()" from a button, the original content will work fine, and the new content will also work too, except the "+" expandable symbol isn't initially shown and the collapse all/expand all links do not work.
Any help would be greatly appreciated!
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
3) Describe problem:
I am trying to use the Switch Content Script on a set of search results that gets dynamically placed into the search results DIV. This way users can see more results on one page and expand them if they want to see more.
My problem is that the collapsing does not work when I add these results after the page has initially loaded. For example, I have a function called "submit()" that will populate the window with search results. If I call submit within the HTML for the page, the results will populate properly and collapse/expand on clicking. However, if I modify the page to run "submit()" as the result of clicking on a button on the page, the collapse/expand functionality no longer works.
To make things more interesting, if I add collapsible/expandable content within the HTML of the page, and then call "submit()" from a button, the original content will work fine, and the new content will also work too, except the "+" expandable symbol isn't initially shown and the collapse all/expand all links do not work.
Any help would be greatly appreciated!