PDA

View Full Version : hide-show tables question


JAZZASTUDIOS
07-05-2007, 01:38 AM
hey guys, i dont know if this is php or not
i just need to know:

if i have a table with only 2 rows, and in the top row is an image, banner size,
is there a way to make it so that when the banner image is clicked the bottom row of the table is completely hidden along with all of its content?

is there a way to make it hidden when the page is first entered, and then can hide and show when clicked?

PLEASE if you can answer this do so i beg of you all

vinyl-junkie
07-05-2007, 02:07 AM
The easiest way to hide or show any page element is with javascript. Just search that forum with the keywords "show hide javascript" (without the quotes in the search box. There are plenty of examples that show you how to do that.

mlseim
07-05-2007, 02:51 PM
Jazz ...

If you have an actual page with the table, provide us the link.

It can be done with PHP or Javascripting ... I'm thinking PHP because
you may want control over this on several pages and several tables?

With PHP, you could even make this cookie or session related that controls
how it's displayed the whole time they are on your site, and whether or not
things change when they return later to your site.

ronaldb66
07-05-2007, 04:48 PM
If you want to be able to toggle the visibility without reloading the page you'll gonna need dynamic behaviour aka JavaScript, though...

mlseim
07-05-2007, 11:47 PM
agreed .... perhaps more into AJAX

rfresh
07-06-2007, 06:35 AM
Since he has no data to worry about then his best solution would be to do this in Javascript. It would give the appearance of an ajaxed web page without having to actually ajax it. PHP would cause the page to have to be refreshed and since there is no data involved, while PHP would work, it wouldn't be the best solution in this case. I agree with Ronald, I'd go with Javascript!

mlseim
07-06-2007, 06:38 PM
I wish we could see the site ... I'm sort of thinking ahead, like he may
want to do some dynamic stuff on multiple pages. Question is sort of vague.