Sunday September 07, 2008 - Local Time: 14:52 U.S. Central Time
  

Creating a Scrolling Ticker

It is quite easy to create a scrolling ticker on your page with a JavaScript. Here are steps:

  1. Highlight the entire JavaScript shown below, copy and paste it your Web page right after the tags
  2. Replace the red text where you want you own message


<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. We will not be held responsible for any unwanted effects due to the usage of this applet or any derivative. No warrantees for usability for any specific application are given or implied. Chris Skinner, January 30th, 1996. Hacked for CNNfn by RD, Jan. 31, 1996
*/

function scrollit_r2l(seed)
{
var m1 = "Welcome to my how-to page........ ";
var m2 = "I will show you how to create a scrolling ticker........ ";
var m3 = "Good luck and have fun!........ ";
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>
<BODY ONLOAD="timerONE=window.setTimeout('scrollit_r2l(100)',500);">


  Last updated: August 15, 2006

Copyright © 1994 - 2007 Dr. Steve Yuen. All rights reserved.