Greetings all

If you document.close(), document.open(), then document.write() the
*contents* of a frame, and those contents are long enough to warrant a
scroll bar, Netscape 6.01 won't give you one.

If you try to fool it by loading a SPAN or DIV in to the frame that is large
enough to force a scrollbar, then replace the content with document.close(),
document.open(), document.write(), the scrollbar does not work (doesn't even
respond).

Is there a way to make this work?  I can't find anything in Bugzilla.  Do I
need to create a bug?

Test case.  Create three files:

nsft.htm
<HTML>
<FRAMESET FRAMEBORDER="Yes" ROWS="50%,50%">
 <FRAME SRC="blank.htm" SCROLLING="Yes" NAME="SomeFrame"
ID="SomeFrame"></FRAME>
 <FRAME SRC="control.htm" SCROLLING="Yes" NAME="Control"
ID="Control"></FRAME>
</FRAMESET>
</HTML>

blank.htm
<HTML>
<BODY>
<!-- uncomment this to force a scrollbar that won't work after content is
dynamically changed
<SPAN STYLE="position: absolute;left: 0px; top: 0px;width: 1px; height:
5000px;"></SPAN>
-->
</BODY>
</HTML>

control.htm
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function Render()
{
 alert( "about to dynamically render" );
 var s = "";
 for( var i = 0; i < 5000; i++ )
 {
  s += i + "<BR>"
 }
 with( window.top.frames[0].document )
 {
  close();
  open();
  write( s );
  close();
 }
}
</SCRIPT>
</HEAD>
<BODY ONLOAD="JavaScript:Render();">
</BODY>
</HTML>




Reply via email to