01-15-2010, 09:05 PM
Hello all. I am wanting to have a table that is 4 columns by 6 rows. Each cell will have heading and some options below them. What I want to do is for the page to load with the table collapsed as small as possible, only showing the headings, and when you click on the heading, the options will expand in a <div> whereby expanding the cell and pushing the other headings down. Is this easily possible? It is ok if the whole row expands if any of the divs in that row are selected.
01-15-2010, 11:15 PM
Another way is to use firebug (firefox extension) and look at the scripts that do this on other websites since often you can learn the name of the script and then just go search for that script in particular (there is a good chance they used a readily available free script).
www.graduationstoles.net (http://www.graduationstoles.net/) is a site my colleague built which uses exactly that sort of script. But is a prime example of how not to do this (he is working on fixing it now, but I can't even help him because it is such convoluted code and it is built in asp.net). As it is now on that site, if you have JS disabled there is simply no way to expand those cells and see the content. Much better for SEO too if they were expanded by default and then only collapsed when the JS loaded (since search engines' bots don't use JS).
01-16-2010, 02:56 AM
Hi, Parallon. What exactly is it you are building there? In other words, what do you intend to put inside those table cells?
Depending on the type of content/data you are hoping to display, there might be a better way of doing this, just using divs. This all depends on whether you really need a table in there or whether you are trying to use the table as a layout device.
01-18-2010, 04:26 PM
Thank you both for your replies. I think I found a tutorial that might work, and am in the middle of testing it. Doctor_Varney, what I am wanting within these divs are a series of checkboxes. This will be a pre-work safety checklist. Each div will be a category, and when they expand that category, they will see the relevant options. With 22 different categories and 235 options, I just didn't want to have a big table displayed when they open the page.
Thanks again linehand,