73D41416194E8A7C390936971FB2B74B Chira Sathi: Scrolling Title in Browser title bar for blogspot

Monday, October 10, 2011

Scrolling Title in Browser title bar for blogspot

One of the most common uses of JavaScript is to create a scrolling message in the browser's status line. You can create a scrolling message using the string methods you have learned in this hour.
To begin, you'll need to define the message to be scrolled. You will use a variable called msg to store the message. To begin the script, initialize the variable (feel free to choose your own text for the message):

Steps to follow:

Log in to Blogger -> Layout -> Edit HTML and select the tick-box Expand Widget Templates
Then, find (CTRL+F) this code in the template


And immediately before it, paste this code:

<script type='text/javascript'>
msg = "
msg = " .................................. " + msg;pos = 0;
function scrollMSG() {
document.title = msg.substring(pos, msg.length) + msg.substring(0, pos); pos++;
if (pos > msg.length) pos = 0

Now click Save Template 
Best Blogger Gadgets