Categories:

Home / Free JavaScripts / Status Bar effects / Here

Cut & Paste Scroller using the status bar
Credit: Not indicated

Description: The script will scroll any text along the status bar.

Example:

Directions: Simply cut and paste this script into the <body> tags of your page, and add the part in blue into inside of your body tags. Be sure to edit the text that will scroll!

<BODY onLoad="scrollit(100)">
<SCRIPT>
<!--
function scrollit(seed) {
var m1 = "Hope you've enjoyed your stay here!";
var m2 = " JavaScript Kit. Your ultimate";
var m3 = " source for JavaScripts!";
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);
}
}
}
//-->
</SCRIPT>


JavaScript Tools:
Site Info


CopyRight (c) 2018 JavaScript Kit. NO PART may be reproduced without author's permission. Contact Info