Hi Experts.
Please put the code sample below into an html document and take a look
at in NN6+. One span should be shown while the other is hidden.
Clicking the button should reverse this. However it doesn't.
Removing the table structure from around the text fixes it, but I need
the table structure (this is very simplified example).
Hope someone can provide an alternative?
Thanks,
Stewart
<html>
<head>
<title>Spans</title>
<script type="text/javascript">
function hideShow()
{
var spn1 = document.getElementById("spnShow");
var spn2 = document.getElementById("spnHide");
if (spn1.style.display == "inline")
{
spn1.style.display = "none";
spn2.style.display = "inline";
}
else
{
spn1.style.display = "inline";
spn2.style.display = "none";
}
}
</script>
</head>
<body bgcolor="#FFFFFF">
<input type="button" value="Hide/Show" onclick="hideShow();">
<span id="spnShow" style="display: inline"><table><tr><td>Why can't I
be hidden?</td></tr></table></span>
<span id="spnHide" style="display: none"><table><tr><td>I should not
be visible</td></tr></table></span>
</body>
</html>