Hi
I'm creating a webpage that is going to utilize several tables that are hidden by default, and by clicking on a title, will load that table, and remove the current one (or hide it).
The page can be found here:
http://www.djsting.com/sstest
The code works to a certain extent... clicking the link will show/hide the table but it appears below the rest of them, so both are visible. I only want one visible at any given time, and clicking a link will display that table while hiding the others. I hope that is clear enough
Here is my current code:
And my links have this code:Code:<script> function toggle_it(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = ""; } else { obj.style.display = "none"; } } } </script>
What do I have to insert into the code to have it hide the current table, then display the new one? Please and thanks!Code:<a href="#" class="style11" onClick="toggle_it('ss14')">Sting Selections Vol. 14</a>
-Sting



Reply With Quote

Bookmarks