View Single Post
  #2 (permalink)  
Old June 17th, 2004, 10:50 AM
Walter G Walter G is offline
Registered User
Join Date: Jul 2003
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Hi I kept searching and found an example that works at
I tested the example and it works just the way I wanted it to.


Here is the code.

This works on IE5.5 and seems to work most of the time on NS 4.7 <html>
<title>Scroll textbox</title>
<script language=javascript>

function scrollTextarea()
{var obj=document.forms.main.elements.text;

var gradual=true; // true to scroll slowly, false to jump


if (document.layers)
else if (gradual)
{var top=-1
while (top<obj.scrollTop)

function fillTextarea()
{var htmlStr="";
for (var i=0;i<100;i++)
{htmlStr+="<h3>Line "+i+"</h3>\n"}

<body bgcolor=black onload="fillTextarea();scrollTextarea();">
<basefont face=arial color=lime>
<h2>Scroll textbox</h2>
<form name=main action=# method=get>
<textarea name=text rows=10>
</html>Not sure how will get on in NS6, but NS6 won't lanuch at the moment to test!!
Referred to msdn ( for dom


Reply With Quote