The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Hide/Show Tables
Blue Dragon 819
post Feb 17 2007, 06:51 PM
Post #1





Group: Members
Posts: 1
Joined: 17-February 07
Member No.: 1,937



Ok, hello guys, I'm new here. I was just wondering if anybody knows of a code that I can use to Hide/Show tables. What I mean by that is that when I have a table displayed, I want there to be a button in a corner of the table that allowes me to minimise it. So for example...

If this was my Table:
_______________________________________________
|..........................................................................|
|............................Table Title......................( - )....|
|______________________________________________|
|..........................................................................|
|..........................................................................|
|..........................................................................|
|..........................Table Contents............................|
|..........................................................................|
|..........................................................................|
|..........................................................................|
|..........................................................................|
|______________________________________________|

After hitting the "-" button I would want it to turn to this:

_______________________________________________
|..........................................................................|
|............................Table Title......................( + )....|
|______________________________________________|

So basically I want the "-" button to hide the contents of the table in other words I want it to minimize the table so that only the table title is showing.

Then I also want a "+" button to appear instead of the "-" when it is minimized so that I can bring it back to the full table.

I'm sorry if this doesn't make sence, I tried to explain myself the best as I possibly could. If somebody could give me this code I would be very greatful. biggrin.gif

This post has been edited by Blue Dragon 819: Feb 17 2007, 06:52 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 18 2007, 06:12 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



There are many similar scripts on the web (search for e.g. "show hide javascript"), but most of them assume the content is initially hidden.

Should the +/- "button" be made from plain text characters, images or form buttons?

Should the same script work on more than one table on the page?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 07:49 AM