I need use concat function to join strings in this script but I’m doing something wrong because instead all messages from array were scrolling as one is status bar for me they are showing letter by letter. How to use concat here?
[CODE]
<head>
<script language=”JavaScript”>
<!–
Msg = new String(2);
Msg[0] = “message1”;
Msg[1] = “message2”;
Msg[2] = “message3″;
var c=0
var cntr=0;
for (v=0; v<=2; v++)
{
for (i=0; i<120; i++){
Msg[v]=” “+Msg[v];
}
}
function StatusScroll()
{
if (cntr>2)
cntr=0;
if (c < Msg[cntr].length)
{
window.status=Msg[cntr].substring(c,Msg[cntr].length);
c++
}
else
{
c=0;
cntr++;
}
setTimeout(“StatusScroll()”,50);
}
function String(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = “”;
}
return this;
}
//–>
</script>
</head>
<body onload=StatusScroll();>