Closed Thread Icon

Topic awaiting preservation: Hide/Show table cells and contents? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8400" title="Pages that link to Topic awaiting preservation: Hide/Show table cells and contents? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Hide/Show table cells and contents? <span class="small">(Page 1 of 1)</span>\

 
kw7669
Nervous Wreck (II) Inmate

From: Columbus, Ohio, USA
Insane since: Nov 2002

posted posted 11-21-2002 20:52

Hello. I was wondering if someone knew of a way to hide/show the table cells and it's contents?

Any and all help is appreciated.


Thank you and have a great day.

Ken

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 11-21-2002 21:08

Hi there kw7669, welcome

A common way of showing/hiding stuff is putting a <div> tag with an ID around it and then toggling its "display" CSS property via JavaScript.

Like if you have some code in a table cell it could look like this:

<tr>
  <td>
    <div id="blockA">
      <p>Some text which is going to be hidden soon...</p>
    </div>
  </td>
</tr>

Now in JavaScript you would access the <div> like this:

document.getElementById("blockA").style.display = "none";

and if you want to show it again:

document.getElementById("blockA").style.display = "block";

Also see this FAQ:
http://faq.ozoneasylum.com/751/

And I think you should be able to do exactly the same thing to hide the radio buttons you mentioned in your previous post.

[edit: Hey TP, you improved the FAQ's search function! Cool ]



[This message has been edited by kuckus (edited 11-21-2002).]

kw7669
Nervous Wreck (II) Inmate

From: Columbus, Ohio, USA
Insane since: Nov 2002

posted posted 11-21-2002 22:19

That worked. Thanks.

But do you know of a way to hide/show the whole row at once?

Thank you and have a great day.

Ken

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 11-21-2002 22:22

You could try and assign the ID directly to the <tr> tag instead of the <div>.

I'm not sure which browsers will let you do it that way though...

« BackwardsOnwards »

Show Forum Drop Down Menu