September 18, 2011

Scrolling Status Bar using Javascript

Displays a scrolling Text in the browser status window      

<SCRIPT LANGUAGE="JavaScript">
<!-- hide from old browsers
var count = 0;
// Change the number after delay to change scroll speed.
// Higher number equals slower scroll.
var delay = 250;
// text between quotes will display in the status window.
// Leave blank spaces after text.
var text = "Jagan's Home Page...                      ";
function  scroll () {
       window.status = text.substring (count, text.length) + text.substring (0, count)
        if (count < text.length)
                count ++;
        else
                count = 0;
        setTimeout ("scroll()", delay);
}
// end hiding -->
</SCRIPT>

<BODY onLoad="scroll();">

No comments:

Post a Comment