A status scroller that displays the text one letter at a time

Source Code

<html>
<head>
<title>status Bar scroller</title>
</head>

<body>
<script>
<!--
message = "This is another example of a simple typewriter example^" +
                "You can enter an unlimited number of lines here^" +
                "Please, take a look at the code for a more detailed description^" +
                "Created by Michiel Steendam^" +
                "This typewriter will repeat now ...^" +
                "^"
scrollSpeed = 25
lineDelay = 1500

txt = ""
function scrollText(pos)
{
    if (message.charAt(pos) != '^')
    {
        txt = txt + message.charAt(pos)
        status = txt
        pauze = scrollSpeed
    }
    else
    {
        pauze = lineDelay
        txt = ""
        if (pos == message.length-1) pos = -1
    }
    pos++
    setTimeout("scrollText('"+pos+"')",pauze)
}
// Unhide -->
scrollText(0)
</script>
</body>
</html>

 

Send mail to santhosh_emids@yahoo.com with questions or comments about this web site.
Last modified: November 12, 2000