Introduction
Use this script to create a news ticker like this:
This script was tested with the following operating systems and browsers:
Windows XP: | IE 6, NN 7, Opera 7 + 9, Firefox 2 |
Mac OS X: | IE 5, Safari 1 |
If you use another browser or operating system, this script may not work for you - sorry.
NOTE: IE 5 on Mac OS doesn't view elements (text etc.) below the ticker area properly;
they will appear underneath the ticker area instead.
Usage
Insert your ticker entries (var tickerEntries) and adapt the configuration to your needs.
Then insert this line into your HTML body where you want the ticker to appear:
<script language="JavaScript" src="ticker.js"></script>
You should also put the following line on top of your HTML page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
This is necessary to fix the CSS box model bug of Internet Explorer.
NOTE: The actual width of the ticker DIV depends on the text length of your ticker messages. You can
of course set the visible ticker area to any size you wish, but this has no effect on the actual width.
If the actual width is bigger than the width of your browser window, a horizontal scrollbar might appear.
You can avoid this by putting the page with the ticker script into a frameset with scrollbars turned off.