Hi,
I've read through quite a number of postings on here so far and have
seen what look like very simply, reasonable answers to this question,
however I am still completely unable to do what I want to do.
I just want to know how I should toggle the visibility of divs in
Netscape (I'm using 7). For example, say I have the following HTML
code:
<a href='javascript:showMyDiv();'>Show mydiv</a>
<div id='mydiv' style='visibility:hidden;'>
This text does not appear when I load the page in Netscape, so I know
it recognizes the 'visibility:hidden;' part of the above tag.
</div>
However, when I click on the link (coded as above), the following
javascripts do not make the div appear. It works fine in Explorer.
<script>
function showMyDiv()
{
mydiv.style.visibility = "visible"; // Works in IE, not Netscape
document.mydiv.style.visibility = "visible"; // Ditto
// THE FOLLOWING WERE SUGGESTED, BUT NONE OF THEM WORK FOR ME
document.mydiv.style.visibility = "show";
document.mydiv.visibility = "show";
document.mydiv.style.visibility = "visible";
document.mydiv.visibility = "visible";
document.mydiv.display = "";
document.mydiv.style.display = "";
}
</script>
Can anyone tell me what the syntax really SHOULD be?
Eternal thanks in advance.
- Jon