Copyright (C)1996 Philip Tan Boon Yew
All Rights Reserved. These functions can be re-used or modified, if credit is given in the source code. I will not be held responsible for any unwanted effects due to the usage of these functions or any derivative. No warrantees for usability for any specific application are given or implied.
Philip Tan, 22nd of April, 1996.
Also, the variable sclTimer is used to maintain the timeout cycles of statuScroll. Don't use sclTimer for anything other than running or stopping statuScroll, the effects are unpredictable.
Apparently, status scrollers, if left alone long enough, will eventually run Netscape out of memory (!) Although I've yet to see this happen to statuScroll, I think it's entirely possible that it will happen. statuScroll is very compact considering the code executed, so you might have to wait really long before it'll crash.
On the other hand, you've got to have a very good page before anybody's going to spend that long looking at your page. If your page is so good, why distract browsers with a status scroller? :)
Look at the source of this HTML document to get at the code. They are fully annotated and should be easy enough to tailor for your own uses.
Demo
This demo shows how statuScroll works. Although statuScroll is running when this page is opened, you can stop it by clicking on 'Stop statuScroll'. Restarting the scrolling is done by clicking 'Run statuScroll'. You can actually have 2 or more statuScrolls running simultaneously, but it looks bad. Try it, though...
To illustrate statuScroll's single-location variables, you can alter the properties for the speed of scrolling and number of blank spaces put behind your message after the message completes one cycle. Changes are real-time. Once you confirm the changes by clicking anywhere outside the field you are changing, the changes will take effect. Try it out!!
Back to the JavaScript Archives