Marquee – Scrolling Status Bar

[Total: 0    Average: 0/5]

This shows how to have a scrolling message in the status bar.

Body Code:

<script type=text/javascript>
var _a = "This is my text to display in the status bar.";
var _l = _a.length;
while (_a.length < _l * 2) _a += " ";
var _p = -1;
function showIt() {
  if (++_p >= _a.length) _p = 0;
  var _h = _a.substr(0,_p);
  while (_h.length > _l) _h = _h.substr(1,_h.length);
  while (_h.length < _l) _h = " "+_h;
  window.status = _h;
}
var X = null;
function startIt() {
  X = setInterval('showIt()',30);
}
function stopIt() {
  clearInterval(X);
}
</script>
<BR><a href="javascript:startIt()">Start</a>
<BR><a href="javascript:stopIt()">Stop</a>

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *