doScroll method not compatible with Netscape

From: Guy Bonin (guybonin_at_aei.ca)
Date: 07/06/04


Date: Tue, 6 Jul 2004 19:21:52 -0400

Hi to everyone,

I am trying to add a script to control text vertical scrolling within a
textarea on my Web page.

I have made a test with the doScroll method which is part of the Microsoft
MSDN library
(ref. :
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/doscroll.asp). I
have defined behaviors on images that use the following function calls :
  function scrollBehaviorUp()
  {
  txtScrollMe.doScroll("scrollbarPageUp");
  }

  function scrollBehaviorDown()
  {
  txtScrollMe.doScroll("scrollbarPageDown");
  }

where txtScrollMe is my textearea nam defined with the following parameters
:

  <textarea cols="50" rows="25" class="colorIt" id="txtScrollMe"
style="border:0px solid #5F665F; font-family: = Arial, Helvetica, sans-serif
font-size: 10pt; color: #FFFFFF; background-color: #5F665F;
width:97%;overflow-x:hidden;overflow-y:hidden">

When testing with IE version 6, I get exactly what I expect. But it is not
the same story when testing with Netscape which do not execute none of these
new behaviors. Is ther an method equivalent to doScroll that would be
compatible with most of the browsers (and not only with IE) ?

Moreover, I had succeeded in eliminating the gray standard scroll bar in IE
by adding the following to the textarea definition :
overflow-x:hidden;overflow-y:hidden

But with Netscape, the gray scroll bar is still there at the right of the
textarea. Is there another way to make it invisible ?

Finally, the doScroll method use parameters like scrollbarPageDown or
scrollbarDown to scroll one down the equivalent of one page or one arrow. Is
there a way to call this function using intermediate values, like for
instance a pre-defined number of pixels ?

Thanks in advance,

P.S.: you can consult the corresponding code at URL :
www.michelthomaspoulin.com/feuilletion/f001.html

---
Le courrier sortant est certifié sans virus.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 2004-07-05