raechyl
03-27-2005, 04:42 PM
Hey guys, I'm trying to figure out how to display and hide tables. I've been searching all over, and I'm usually pretty good about figuring things out on my own based on other people's queries, but I'm stumped. Essentially, I've got multiple tables within one table that I want to display or hide based on the user clicking the nav buttons. It's kind of simulating frames, now that I think about it. I've been using the following code, and it worked up until I used it with tables instead of text:
function TEXT_Show(sAnswerID)
{
document.getElementById(sAnswerID).style.display = (document.getElementById(sAnswerID).style.display == "none") ? "" : "none";
}
Of course, that is only to display the tables. I have no idea how to go about hiding them.
One more thing (sorry this is so long...), the code needs to display one table, and hide all the others. There's got to be some way to do this...Any ideas??
Thanks!
function TEXT_Show(sAnswerID)
{
document.getElementById(sAnswerID).style.display = (document.getElementById(sAnswerID).style.display == "none") ? "" : "none";
}
Of course, that is only to display the tables. I have no idea how to go about hiding them.
One more thing (sorry this is so long...), the code needs to display one table, and hide all the others. There's got to be some way to do this...Any ideas??
Thanks!