PDA

View Full Version : Add Scrolling message to the site status bar



admans
07-18-2005, 17:33 PM
Place this script up above te HTML code..


__________________________________________________ _
<script language="JavaScript" type="text/javascript">
<!--
//Thank you 4 using this script.

// You may edit the message below.

var startMsg = "Welcome to www.mobile-addict.com";

var str = "";
var msg = "";
var leftMsg = "";


function setMessage()
{
if (msg == "")
{
str = " ";
msg = startMsg;
leftMsg = "";
}

if (str.length == 1)
{
while (msg.substring(0, 1) == " ")
{
leftMsg = leftMsg + str;
str = msg.substring(0, 1);
msg = msg.substring(1, msg.length);
}

leftMsg = leftMsg + str;
str = msg.substring(0, 1);
msg = msg.substring(1, msg.length);

for (var ii = 0; ii < 120; ii++)
{
str = " " + str;
}
}
else
str = str.substring(10, str.length);

window.status = leftMsg + str;
// This editable value (1000 = 9 second)
// corresponds to the speed of the shooting
// message.
timeout = window.setTimeout('setMessage()',100);

}
// -->


<!--Update the BODY tag for the timer function.-->

<!-- You may edit the BODY color. -->
<BODY bgcolor="#FFFFFF" onload="timeout = window.setTimeout('setMessage()',500);">