View Full Version : simple show hide table problem

07-05-2007, 01:36 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, lol!

07-05-2007, 09:42 PM
Yes what you want to do is achievable in javascript.

You can attach an onclick event handler to any element, e.g. a table row, an image, etc.
You can hide an element by setting the "display" property to "none" and then to display the element again set the display property to "block" (or "" might want to check the documentation on that).
If you want the second row hidden when the page is opened you can add an "onload" event handler to call a function that will hide the second row.

07-06-2007, 09:24 AM

Can u send me the code plz,