Results 1 to 3 of 3

Thread: Why wont work the collpsible script

  1. #1
    Join Date
    Oct 2008
    Location
    Warsaw, Poland
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Why wont work the collpsible script

    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:

    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>
    and it looks good...

    any suggestions? thx for help.
    Last edited by macieq; 10-30-2008 at 11:49 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    There are a couple of threads on this, for example: http://www.dynamicdrive.com/forums/s...d.php?p=161312
    DD Admin

  3. #3
    Join Date
    Oct 2008
    Location
    Warsaw, Poland
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default ok

    It is working now. thx (i coundn't find that post). really thx.

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
  •