javascript to grow divs in table

Discussion in 'Javascript' started by soni2926@yahoo.com, Apr 7, 2007.

  1. Guest

    hi,
    I have a table with <tr> rows which contains <div>, those divs
    contains another table, that table contains product information.
    Basically it looks like this:

    <div style="visibility:hidden;">
    <table>
    <tr>
    <td>Product Name</td>
    <td>Price</td>
    </tr>
    </table>
    </div>
    This repeats depending on how many products are returned, is there
    anyway to hide and display it without the space being there when it's
    hidden? overall something like this:
    <!-- 1st Order -->
    <table>
    <tr>
    <td>abc</td>
    <td>kdfk</td>
    </table>
    <div style="visibility:hidden;">
    <table>
    <tr>
    <td>Product Name</td>
    <td>Price</td>
    </tr>
    </table>
    </div>
    <div style="visibility:hidden;">
    <table>
    <tr>
    <td>Product Name</td>
    <td>Price</td>
    </tr>
    </table>
    </div>
    <!-- 2nd Order -->
    <table>
    <tr>
    <td>abc</td>
    <td>kdfk</td>
    </table>

    I have it so that the div areas hide and show when a link is clicked,
    but when hidden there is a large gap inbetween the tables, anyway to
    make it so that when it's hidden the gap is reduced and when show it's
    grows to make room for it?

    Thanks.
     
    , Apr 7, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Ui4gVG9kZA==?=

    AspCompat causes CCW count to grow

    =?Utf-8?B?Ui4gVG9kZA==?=, Jun 18, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    436
    =?Utf-8?B?Ui4gVG9kZA==?=
    Jun 20, 2005
  2. Lee

    Can Divs automatically grow?

    Lee, Dec 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,373
  3. rich
    Replies:
    0
    Views:
    752
  4. Scott
    Replies:
    5
    Views:
    1,468
    Jan C. Faerber
    Oct 29, 2009
  5. maya
    Replies:
    4
    Views:
    262
Loading...

Share This Page