[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question from another group



On Wed, 14 Feb 1996, anx.scan wrote:

> someone posted this to another mail group im in.  I, also, am 
> interested in the answer... so read on and tell me if this is 
> possible:
> 
> ----------------------
> From:             dreamz@webcom.com
> 
> 
> below is the script for web page i have done for a client.
> (www.sat.net/netgate) anyway, what it does (take a look at the page)
> is scroll a message accross the bottom of the netscape 2.0 browswer
> window..... im sure youve seen it before
> 
> my problem is, i want it to go faster... and i cant make it... anyone
> who knows java better than me, which would be anyone who knows java,
> please take a look at the script below, which i exerpted from the html
> doc, and look at the page, and make suggestions for speeding it up, if
> possible. thanks
> 
> thanks
> dale
> 
> script exerpt:
> <HEAD>
>     <TITLE>NET.Gate Home Page</TITLE>
> <SCRIPT LANGUAGE="JavaScript">
> 
> <!-- Beginning of JavaScript Applet -------------------
> 
> function scrollit_r2l(seed)
> 
> {
>         var m1  = "Welcome to NET.Gate, your local access to the
>         information
> superhighway.  ";
>         var m2  = "Our next Learning To Use The Internet Class ill be
>         held
> on February 28, 1996. ";
>         var m3  = "Class time is 7:00pm, and will be held in the
>         Second
> Floor Classroom at Medical Center Hospital. ";
> 
>         var msg=m1+m2+m3;
>         var out = " ";
>         var c   = 1;
> 
>         if (seed > 100) {
>                 seed--;
>                 var cmd="scrollit_r2l(" + seed + ")";
>                 timerTwo=window.setTimeout(cmd,100);
>         }
> 
>         else if (seed <= 100 && seed > 0) {
>                 for (c=0 ; c < seed ; c++) {
>                         out+=" ";
>                 }
> 
>                 out+=msg;
>                 seed--;
>                 var cmd="scrollit_r2l(" + seed + ")";
>                     window.status=out;
>                 timerTwo=window.setTimeout(cmd,100);
>         }
> 
>         else if (seed <= 0) {
>                 if (-seed < msg.length) {
>                         out+=msg.substring(-seed,msg.length);
>                         seed--;
>                         var cmd="scrollit_r2l(" + seed + ")";
>                         window.status=out;
>                         timerTwo=window.setTimeout(cmd,100);
>                 }
>                 else {
>                         window.status=" ";
>                         timerTwo=window.setTimeout("scrollit_r2l(100)"
>                         75);
>                 }
>         }
> }
> 
> // -- End of JavaScript code -------------- -->
> 
> </SCRIPT>
> 
> </HEAD>
> 
> <BODY onLoad="timerONE=window.setTimeout ('scrollit_r2l(100)',200);" >

Try increasing the c value   ex. c=10; in your var declarations.

	-Ryan