Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?

irt.org | Knowledge Base | JavaScript | DHTML | Q1739 [ previous next ]

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?

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.