Javascript ticker
The following is code for a javascript ticker
<HTML>
<HEAD>
<TITLE>Scrolling Message</TITLE>
<SCRIPT>
<!--
var winLength = 120; // guess at how many spaces wide the status bar is
var speed = 100; // number of milliseconds between updates
function scroll(count)
{
var msg = "Hi there, here is the ticker.... this is of course the first version of it..... you might think that this is a bit slow...but.....I have seen things that are much slower.....snails for instance...or turtles...don't you think?.....well...that's what I thought....or do you think you waste your time reading this?... probably?...";
var out = " ";
var cmd = "scroll(";
if (count <= winLength && 0 < count)
{
var c = 0;
for (c = 0 ; c < count ; c++)
{
out += " ";
}
out += msg;
}
else if (count <= 0)
{
if (-count < msg.length)
{
out += msg.substring(-count,msg.length);
}
else
{
count = winLength + 1;
}
}
// window.status = out;
document.TickerForm.Ticker.value = out;
count--;
cmd += count + ")";
window.setTimeout(cmd,speed);
}
//-->
</SCRIPT>
</HEAD>
<BODY ONLOAD="window.setTimeout('scroll(winLength)',speed);">
<form method="post" action="" name="TickerForm">
<input type="text" name="Ticker" size="50" >
</form>
</BODY>
</HTML>


