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

Scrolling Message Adjustment



This is a script I've written. I'm new to JavaScript, so could anybody 
tell me how to change the speed of the message, and how, if possible, to 
change the text color and background.  The message isn't scrolling in 
the status area, I changed it to display in a text area.

<SCRIPT LANGUAGE="JavaScript">
<!-- Beginning of JavaScript Applet -------------------
/* Copyright (C)1996 Web Integration Systems, Inc. DBA Websys, Inc.
   All Rights Reserved.
   This applet can be re-used or modified, if credit is given in 
   the source code.
   Modified by Brent Giosta  (bGiosta@ix.netcom.com)
*/
function welcome(seed)
{
        var m1  = "Line One Here"
        var m2  = " Line Two Here"
        var m3  = " Line Three Here"
        var m4  = " Line Four Here"
        var m5  = " Line Five Here"
        var msg = m1+m2+m3+m4+m5
        var out = " ";
        var c   = 1;
        if (seed > 100) {
                seed--;
                var cmd="welcome(" + seed + ")";
                timerTwo=window.setTimeout(cmd,80);
        }
        else if (seed <= 100 && seed > 0) {
                for (c=0 ; c < seed ; c++) {
                        out+=" ";
                }
                out+=msg;
                seed--;
                var cmd="welcome(" + seed + ")";
                    document.HLform.Headline.value=out;
                timerTwo=window.setTimeout(cmd,80);
        }
        else if (seed <= 0) {
                if (-seed < msg.length) {
                        out+=msg.substring(-seed,msg.length);
                        seed--;
                        var cmd="welcome(" + seed + ")";
                        document.HLform.Headline.value=out;
                        timerTwo=window.setTimeout(cmd,80);
                }
                else {
                        document.HLform.Headline.value=" ";
                        timerTwo=window.setTimeout("welcome(80)",75);
                }
        }
}
// -- End of JavaScript code -------------- -->
</SCRIPT>
</HEAD>
<BODY onload="welcome(20)">
<FORM Name= HLform METHOD=GET ACTION="welcome(20)"><INPUT 
NAME="Headline" TYPE=text SIZE=75 MAXLENGTH=75 ALIGN=middle DISABLED>
</TEXTAREA>
</FORM>

Thanks in advance!
---
Brent Giosta
bGiosta@ix.netcom.com
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/