Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1739 How can I make the page longer, or the vertical scroll bar appear when I dynamically populate a layer with lots of content in Netscape Navigator 4?

You are here: irt.org | FAQ | JavaScript | DHTML | Q1739 [ previous next ]

Netscape Navigator 4 does not resize the page as your content grows. The following uses a simple transparent image, which you can create in any painting program, to define a very narrow (1 pixel) but very long image which can be used to reserve enough room for your content:

<html>

<head>

<title>Too long, or not long enough?</title>

<script language="javascript1.2"><!--
function fillDiv() {
  if (document.all)
    for (var i = 0; i < 200; i++)
      document.all.dynamicDiv.insertAdjacentHTML('beforeEnd','Line'+i+'<br>');
  else {
    document.layers.dynamicDiv.document.open();
    for (var i = 0; i < 200; i++) document.layers.dynamicDiv.document.write('Line '+i+'<br>');
    document.layers.dynamicDiv.document.close();
  }
}
//--></script>

</head>

<body>

<img src="dot.gif" width="1" height="3000" align="left">

<form name="fillForm">
<input type="button" value="Fill" onclick="fillDiv()">
</form>

<div id="dynamicDiv" style="position: absolute;"></div>

</body>

</html>

Feedback on 'Q1739 How can I make the page longer, or the vertical scroll bar appear when I dynamically populate a layer with lots of content in Netscape Navigator 4?'

©2018 Martin Webb