|
If you look at the bottom of your browser’s window, you should see a message scrolling along there every 75 seconds or so. This is an example of a “Scroller” JavaScript.
- In the “Inside Head Tag” field of the “Layout Script” window, insert the following code:
<script language="javascript">
var scrlStr="PUT MESSAGE HERE" var width=140; var strLen=scrlStr.length; var pos=1-width;
function scroll() { var scroll = ""; pos++; if(pos == strLen) pos =1 - width; if(pos<0) { for(var i=1; i<=Math.abs(pos); i++)scroll=scroll+" "; scroll=scroll+scrlStr.substring(0,width-i+1); } else scroll=scroll+scrlStr.substring(pos,pos+width); window.status=scroll; setTimeout("scroll()",##); } </script> |
|
Where PUT MESSAGE HERE is the message you wish to scroll, and ## is the interval in seconds before the message replays itself.
- Now, insert the following code in the “Inside Body Tag” field in that same window:
|