High Traffic AD spot for rent

Free Ad Quote
Live Help

1 204 344 5070

We have been receiving numerous requests for the following trick, which
shows you how to code a scrolling message in the browser's location bar.
Consider the script below. Variables that you can change to suit your
needs include the message itself, as well as the speed of delivery and
a "spacer" to set between start and stop of each message iteration.

<script language="JavaScript">
var msg = "Hello, this is a scrolling location bar message!";
var spacer = " ";
var pos = 0;
function ScrollMessage()
window.status = msg.substring(pos, msg.length) + spacer +
if (pos > msg.length) pos = 0;
window.setTimeout("ScrollMessage()", 150);

Note that we have used "periods" (.) for the spacer. You can use blank
spaces as well by hitting the space bar. The message speed is indicated
as a number value, in this case 200. The higher the number, the slower the
speed of the message scroll.