Search this site!

Return to the CSB Support home page
Scroll message on Status Bar
Description:
This is the standard javascript for scrolling a message across the bottom of the browser window, in the status bar area.  The version I've implemented here is based on code posted at: http://javascript.internet.com

One restriction: Be sure you don't already have another BYOWG using the "onload=" option of the <BODY> tag already on the page!
How to use:
1. Copy and paste the code provided in the file 'scroll1.txt' into a BYOWG, which should be placed, preferably, before any other text or images on the body portion of your page
2. Edit the code for your personalized messages. Look for the line that begin: "var m1 ="
3. Publish and enjoy!
Example:
You should see the scrolling message at the bottom of your browser window!
Download the code
right click on link, then click on 'Save target (or frame) as'
Other information:
Hint: most web sites that offer javascript code samples will show the code for the whole page, starting with the <HEAD> tag.  However, when cutting and pasting the code into a Trellix BYOWG, generally, you can start copying from the <SCRIPT> tag.

Source code:

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function scrollit(seed) {
var m1  = "Welcome to KW Support!  ";
var m2  = "..... Home of the 'Unofficial Trellix Support Site' ";
var m3  = "......Enjoy ";
var m4  = "";
var msg=m1+m2+m3+m4;
var out = " ";
var c   = 1;
if (seed > 100) {
seed--;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit(100)",75);
      }
   }
}
// End -->
</SCRIPT>

<BODY onload="scrollit (100)">