It is my problem:
1. I'm getting data from database with ajax.
2. Returnig this data with xml.responseText to div, fine,
3. My data is stored in div's structure.
Structure:
<div><a href="javascritpt:animatedcollapse.toggle('m1')">collspse</a> Title</div>
<div id="m1" style="style:display:none">data</div>
<div><a href="javascritpt:animatedcollapse.toggle('m2')">collspse</a> Title</div>
<div id="m2" style="style:display:none">data</div>
etc....
Im using the Animated Collapsible DIV v2.01 from this page: http://www.dynamicdrive.com/dynamici...edcollapse.htm
When I'm usin it with hard write code without ajax it is okey. But when I want dinamically create the code with php and import via ajax to the view page it isn't work.
What can by the solution this problem?
javascripts links (to jquery-1.2.2.pack.js and animatedcollapse.js) I store in the page with ajax.
the script I generate like this:
and it looks good...Code:<script type="text/javascript"> <?php $query=db_query("SELECT id FROM {table}"); while ($id=db_fetch_array($query)) echo "animatedcollapse.addDiv('m".$id['id']."','fade=1')\n"; ?> animatedcollapse.init() </script>
any suggestions? thx for help.



Reply With Quote

Bookmarks