Results 1 to 4 of 4

Thread: Animated Collapsible DIV v2.01

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

    Question Animated Collapsible DIV v2.01

    i have a problem in Animated Collapsible DIV v2.01

    the script works but if the <div> tag put outside the <tr> and the </div> outside the </tr>

    for example

    <a href="javascript:animatedcollapse.toggle('test')">test</a>
    <div id="test" style="width: 679px; background: #FFFFFF; display:none"><table>
    <tr>
    <td>Hello!</td>
    </tr>
    </table></div>

    it doesnt work at all

    please help me. all i need is to work under tables and forms.

    thank you very much in advance.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In future, please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.


    That said, your example works just fine here. What you cannot do though is to break up the flow of a table with div elements, so this would not work:

    Code:
    <a href="javascript:animatedcollapse.toggle('test')">test</a>
    <table><div id="test" style="width: 679px; background: #FFFFFF; display:none">
    <tr>
    <td>Hello!</td>
    </tr>
    </div></table>
    This would not work:

    Code:
    <a href="javascript:animatedcollapse.toggle('test')">test</a>
    <table>
    <tr><div id="test" style="width: 679px; background: #FFFFFF; display:none">
    <td>Hello!</td></div>
    </tr>
    </table>
    This would:

    Code:
    <a href="javascript:animatedcollapse.toggle('test')">test</a>
    <table>
    <tr>
    <td><div id="test" style="width: 679px; background: #FFFFFF; display:none">Hello!</div></td>
    </tr>
    </table>
    You could even nest a full table inside the div if you need columns and/or rows.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sir, how could i nest a full table inside the div if you need columns and/or rows?

    if i need to toggle a form inside a table?

    thanks a lot.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Since I have no idea what kind of form you want, this is only a very basic example, but I hope you get the idea:

    Code:
    <a href="javascript:animatedcollapse.toggle('test')">test</a>
    <table>
    <tr>
    <td><div id="test" style="width: 679px; background: #FFFFFF; display:none">
    
    <form action="#">
    <table>
    <tr>
    <td><input type="text" name=""></td><td><input type="text" name=""></td>
    </tr>
    <tr>
    <td><input type="text" name=""></td><td><input type="text" name=""></td>
    </tr>
    <tr>
    <td colspan="2"><input type="submit" value="Go!"></td>
    </tr>
    </table>
    </form>
    
    </div></td>
    </tr>
    </table>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •