Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Hide/Show table columns?

 
Thread Tools Search this Thread
Old 12-01-2004, 07:23 PM   #1
Default Hide/Show table columns?


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
  Reply With Quote
Old 12-01-2004, 07:32 PM   #2
Kris
 
Posts: n/a
Default Re: Hide/Show table columns?

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)
  Reply With Quote
Old 12-01-2004, 09:14 PM   #3
Noozer
 
Posts: n/a
Default Re: Hide/Show table columns?

> > 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!


  Reply With Quote
Old 12-01-2004, 09:37 PM   #4
Nik Coughlin
 
Posts: n/a
Default Re: Hide/Show table columns?

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/stru....html#h-11.2.4


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump