Hide/Show table columns?

Discussion in 'HTML' started by Noozer, Dec 1, 2004.

  1. Noozer

    Noozer Guest

    Just wondering if it's possible to hide and show columns in a table without
    actually reloading the page?

    I know that scripting can alter the CSS properties to hide/show rows, but is
    it possible do the same thing with a column?

    Thx!
     
    Noozer, Dec 1, 2004
    #1
    1. Advertising

  2. Noozer

    Kris Guest

    In article <dTord.405556$%k.253183@pd7tw2no>,
    "Noozer" <> wrote:

    > Just wondering if it's possible to hide and show columns in a table without
    > actually reloading the page?


    Yes.

    > I know that scripting can alter the CSS properties to hide/show rows, but is
    > it possible do the same thing with a column?


    There are probably more easy ways, but I find it comfortable enough to
    replace a class value on relevant table cells and have the effect for
    that class value defined in a stylesheet.

    ..hidden {
    display: none;
    }

    <td class="foo">Bar</td>

    Any clever client side script can add another class "hidden" to all the
    element that have a class of "foo" when any particular event occurs,
    like the push of a button. Don't ask me to write one on the spot though.

    --
    Kris
    <> (nl)
     
    Kris, Dec 1, 2004
    #2
    1. Advertising

  3. Noozer

    Noozer Guest

    > > Just wondering if it's possible to hide and show columns in a table
    without
    > > actually reloading the page?

    >
    > Yes.
    >
    > > I know that scripting can alter the CSS properties to hide/show rows,

    but is
    > > it possible do the same thing with a column?

    >
    > There are probably more easy ways, but I find it comfortable enough to
    > replace a class value on relevant table cells and have the effect for
    > that class value defined in a stylesheet.
    >
    > .hidden {
    > display: none;
    > }
    >
    > <td class="foo">Bar</td>
    >
    > Any clever client side script can add another class "hidden" to all the
    > element that have a class of "foo" when any particular event occurs,
    > like the push of a button. Don't ask me to write one on the spot though.


    Answers my question well! I was hoping to be able to treat a column as a
    single entity, but I can deal with classing the individual cells.

    Thanks!
     
    Noozer, Dec 1, 2004
    #3
  4. Noozer

    Nik Coughlin Guest

    Noozer wrote:
    >>> Just wondering if it's possible to hide and show columns in a table
    >>> without actually reloading the page?

    >>
    >> Yes.
    >>
    >>> I know that scripting can alter the CSS properties to hide/show
    >>> rows, but is it possible do the same thing with a column?

    >>
    >> There are probably more easy ways, but I find it comfortable enough
    >> to replace a class value on relevant table cells and have the effect
    >> for that class value defined in a stylesheet.
    >>
    >> .hidden {
    >> display: none;
    >> }
    >>
    >> <td class="foo">Bar</td>
    >>
    >> Any clever client side script can add another class "hidden" to all
    >> the element that have a class of "foo" when any particular event
    >> occurs, like the push of a button. Don't ask me to write one on the
    >> spot though.

    >
    > Answers my question well! I was hoping to be able to treat a column
    > as a single entity, but I can deal with classing the individual cells.
    >
    > Thanks!


    Noozer,

    http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.2.4
     
    Nik Coughlin, Dec 1, 2004
    #4
    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. RA
    Replies:
    1
    Views:
    4,031
  2. Jacksm
    Replies:
    2
    Views:
    867
    Paul Chalekian
    Nov 21, 2006
  3. jeet_sen

    Show/hide table columns

    jeet_sen, Mar 28, 2006, in forum: Javascript
    Replies:
    2
    Views:
    306
    jeet_sen
    Mar 29, 2006
  4. Replies:
    6
    Views:
    229
  5. ll
    Replies:
    2
    Views:
    670
    Thomas 'PointedEars' Lahn
    May 1, 2008
Loading...

Share This Page