JavaScript Status Scroller


How To Use It


To use this scroller you must put this code betwixt the head tags of your page.
<script language="JavaScript"> <!-- //This is a JavaScript move a little //marquee along the status bar. //You may you this as long as it is //kept in its original form. You can, however, change the //message variable. //(c)John Woehler, 1997 //The show variable can be set thru the onMouseOver () //event handeler. It should be set to about 20. The purpose //is to stop the banner so links can be seen in the status bar. var show=0; //This is the text to scroll. The spaces are important as placeholders. var message="Welcome to my homepage! Nothing new to report today! "; var startIndex=0; var endIndex=message.length; function doStatusTicker () { var msglen=message.length; var screenText; if (endIndex>msglen) endIndex=0; if (startIndex>msglen) startIndex=0; if (startIndex>endIndex) { screenText=message.substring(startIndex, msglen); screenText+=message.substring(0, endIndex); } else { screenText=message.substring(startIndex, endIndex); } if (show<=0) window.status=screenText; else show--; endIndex++; startIndex++; setTimeout ("doStatusTicker ()", 100); } doStatusTicker (); //End Status Marquee Code </script>
You must then replace message variable's value to whatever text you want to be scrolled. The trailing spaces are important, show you shouldn't remove them. The show variable will pause the scroller for its value of cycles. The recommended use of this is to be used in the onMouseOver () handler to stop the scroller so the link's destination will be visible. The value should be about 20.

About



This script is (C)John Woehler, 1997.