Friday, January 29, 2010

Add Scrolling Text to Status Bar

How To Add Scrolling Text to Status Bar ?
1.Login to your blogger dashboard and go to Layout --> Page Elements.
2.Click on 'Add a Gadget' on the sidebar.
3.Select 'HTML/Javascript' and add the one of code given below and click save.
<script language=javascript>
function statusbar(val)
{
var msg  = "TYPE-YOUR-MESSAGE-HERE";
var res = " ";
var speed = 100;
var pos = val;

if (pos > 0) {
for (var position=0 ; position< pos; position++) {
 res += " ";
}
res+=msg;
pos--;
window.status = res;
timer = window.setTimeout("statusbar("+pos+")",speed);
}
else{
if( -pos < msg.length) {
 res += msg.substring(-pos,msg.length);
 pos--;
 window.status=res;
 timer = window.setTimeout("statusbar("+pos+")",speed);
}
else
{
 window.status= " ";
 timer = window.setTimeout("statusbar(100)",speed);
}
}
}
statusbar(100);
</script>

Now you are done.

4 Comments:

Rival Aditya said...

amankah yg pertamaxxx..

Rival Aditya said...

he..he.. ternyata aman

Rival Aditya said...

sekarang waktunya koment..,>> wuih kelihatannya bgus tuch.. kpn" cba ach.. thx's yach De'.. Muachhhhhhhhhhh

Mr. X said...

Wah mas Riv nih memang baik hati,rajin komentar...
makasih ya...
balasanya aku cium nih ... muahhhh.

Post a Comment

 
top