When a user clicks on a particular link on the page, I want to be able to test to see if a particular table is visible. It is is not I want to show it and if it is I want to hide it - fairly straightforward - or so I thought.
Howver the test on the visibility property always returns a blank and hence the else clause is always getting run. How do I test the visibility of an item on the page?
Mighty
Code:
function showDetails(section)
{
// Check to see if the section is visible or not
if (document.getElementById(section).style.visibility == "visible")
document.getElementById(section).style.visibility = "hidden";
else
document.getElementById(section).style.visibility == "visible";
}
Howver the test on the visibility property always returns a blank and hence the else clause is always getting run. How do I test the visibility of an item on the page?
Mighty