[thelist] Netscape 6/7- trouble with style.display= changing the layout!
Dave Naden
Dave.Naden at sas.com
Mon Sep 2 22:13:01 CDT 2002
Dear list,
I'm at a loss with this problem--when I run the enclosed code, by assigning style.display- "block", my alignment is thrown off; extra space is added between each row. When the page first loads, it's fine. This works fine in IE 5 or 6, but Netscape 6 doesn't render it correctly. Please help! Is there a workaround?
-Dave Naden
dave.naden at sas.com
Code follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>Test Page to find out why NN6 is not rendering this thing right! </TITLE>
<SCRIPT type="text/javascript" language="Javascript">
function hidethem() {
for (var ii = 5; ii<7; ii++) {
var obj = document.getElementById("node" + ii);
obj.style.display = "none";
}
}
function showthem() {
for (var ii = 5; ii<7; ii++) {
var obj = document.getElementById("node" + ii) ;
obj.style.display = "block";
}
}
</SCRIPT>
</HEAD>
<BODY>
<TABLE CELLSPACING='0' CELLPADDING='0' BORDER='0' id="node4"><TR><TD>First table</TD></TR></TABLE>
<TABLE CELLSPACING='0' CELLPADDING='0' BORDER='0' id="node5"><TR><TD>Second table</TD></TR></TABLE>
<TABLE CELLSPACING='0' CELLPADDING='0' BORDER='0' id="node6"><TR><TD>Third table</TD></TR></TABLE>
<FORM name="form1" action="">
<input type="button" value="Hide the inner tables" onClick="hidethem();" >
<input type="button" value="Show the inner tables" onClick="showthem()" >
</FORM>
</BODY>
</HTML>
More information about the thelist
mailing list