Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A snipett to scroll a status line message? 1

Status
Not open for further replies.

docjohn52

Programmer
Sep 28, 2002
114
US
Anybody got a small one?

TIA

John
 
hi docjohn52,

Give this a go.

<html>
<head><title>Scrolling Text</title>
<script type=&quot;text/javascript&quot; language=&quot;JavaScript&quot;>
<!--
var tmp = &quot;&quot;;
function ScrollThis(txt,speed){
for (i=0; i<125; i++){
txt += &quot; &quot;;
}
window.status = txt;
setInterval(&quot;ScrollIt()&quot;,speed);
}
function ScrollIt(){
tmp = window.status;
window.status = tmp.substring(1, tmp.length) + tmp.substring(0,1);
}
-->
</script>
</head>
<body onload=&quot;ScrollThis('This is a line of text',50);&quot;>
</body>
</html>


hope this helps.
 
Works like a champ Raymar

Thanks

and a star from John

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top