Free Web Site - Free Web Space and Site Hosting - Web Hosting - Internet Store and Ecommerce Solution Provider - High Speed Internet
Search the Web
Java Script Tips - Scrolling Text on Status Bar

Scrolling Text on Status Bar

Web Tips: Java Script Tips


      This is very intereting tip! Please take a look at the status bar of your browser, and what's happened? Right! you will see a line of scrolling text there.

Codes as following:

<html>
<head>
<script LANGUAGE="JavaScript">
<!--
var Text = "Thank you for using Scrolling Text. You are welcome to Programming and Development Hut! ";
var TimerSpeed = 50;
var StartPosition = 120;
var TextLength = Text.length;
var Position = 1 - StartPosition;
function ScrollTextOnStatusBar()
{
Position++;
var TextCaption="";
if (Position == TextLength){Position = 1 - StartPosition;}
if (Position < 0){
for (var i=1;i<=Math.abs(Position);i++)
{TextCaption = TextCaption + " ";}
TextCaption = TextCaption + Text.substring(0, StartPosition - i + 1);
}
else
{TextCaption = TextCaption + Text.substring(Position, StartPosition + Position);}
window.status = TextCaption;
setTimeout("ScrollTextOnStatusBar()",TimerSpeed);
};
// --></script>
</head>
<body onLoad="ScrollTextOnStatusBar()">

See Another Sample Codes for Scrolling Text on Status Bar


Copyright (c) 1999 - 2001, robert han, all rigths are reserved.