Results 1 to 4 of 4

Thread: hiding table rows

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    North Yorkshire
    Posts
    102

    hiding table rows

    Hi,
    I've a data input screen that needs to show / hide rows depending if a user checks various option boxes. I can hide a row using style.visiblity but it still leaves a gap on the page. I then tried to set the style.height=1 to shrink the row up, but it still leaves all the other rows in the same place. How can I "roll up" the other rows ? Am I going to have to resize the screen myself or is this something that a <DIV> can deal with ?

    ta

    Andy

  2. #2
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Probably the best way to do what you want is to actually remove and add the rows, provided there isn't too much data that you have to store.

    You could do this with seperate tables in divs, but that is just messy, as now you don't have a single long table.

    The W3C has ECMAScript mapping to the DOM. There are functions that will let you remove and add nodes.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    North Yorkshire
    Posts
    102
    Hi,
    Found what I was looking for;

    to hide the rows...

    style="VISIBILITY: hidden; DISPLAY:none;"

    to make them visible again

    style="VISIBILITY: visible; DISPLAY:block;">

    job done

    cheers
    Andy

  4. #4
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    You could also try "table-row" or "table-row-group" for display settings, or "collapse" for visiblity settings.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width