JavaScript Bouncing Marquee text scroll at Status Bar of web browser
With the help of JavaScript we can add our favorite message with Bouncing Marquee text scroll effect. First of all JavaScript Bouncing Marquee text scroll at Status Bar of web browser.
In this section we see how to add bouncing message at status bar of browser. So we define variables data contain message to be display, limit define bounce limit, message1, direction, speed. Now define function bounce() contain if-else condition helps to bounce message left or right. To shift message left we add two spaces to message1 and assign to message2 message2 = message1.substring( 2,message1.length )+" "; and display it at status bar by window.status=message2;. We refresh message by setTimeout( "bounce();",speed ); repeat the process. As we reach to ‘*’ if ( message1.substring(0,1) == "*" ) direction="right";set direction to right so else condition satisfy and we subtract two spaces from message1 and assign to message2 message2=" "+message1.substring( 0,message1.length-2 ); and display it at status bar by window.status = message2;. And repeat process to ‘*’ and set direction to left if ( message1.substring( message1.length-1,message1.length ) == "*" ) direction= "left"; in this way we can bounce our message at status bar
// More JavaScript - Visit: http://www.xfunda.com/
// JavaScript Message Marquee at Status Bar of web browser
<!--
var data = " My Bouncing Message ... !!! "; // Message to be display
var limit=" "; // define bounce limit
var message1=limit+'*'+data+'*'+limit;
var direction = "left";
var speed = 75;
function bounce()
{
if (direction == "left")
{
message2=message1.substring(2,message1.length)+" ";
window.status=message2;
setTimeout("bounce();",speed);
message1=message2;
if (message1.substring(0,1) == "*")
direction="right";
}
else
{
message2=" "+message1.substring(0,message1.length-2);
window.status=message2;
setTimeout("bounce();",speed);
message1=message2;
if (message1.substring(message1.length-1,message1.length) == "*")
direction="left";
}
}
bounce()
// -->

JavaScript Bouncing Marquee text scroll at Status Bar of web browser
Implementing Script
Implementation of script is quite simple just copy it and paste it any where in <head>--</head> or <body>--</body> section of your webpage.










