Developer's Corner: Tickers | WebReference

Developer's Corner: Tickers

Developer's Corner: News Tickers

Mar. 21, 1996 - There are many ways to put scrolling text and graphics on your pages. One of the easiest is to use Microsoft Internet Explorer's MARQUEE tag. A JavaScript ticker applet can scroll text in both the status bar and inside the page. GIF89a animation can be used with graphical or ASCII text. Server push could be used with graphical text, but is impractical bandwidth-wise. Yet another way is to use Java (see c|net or NandoNet). News ticker screen savers are also now appearing. However you decide to do it, tickers give the illusion (or reality) of real-time news.

Who Supports What?

Both Explorer and Netscape support scrolling tickers, GIF animation, and server push, all of which are not in the expired HTML 3.0 draft. Explorer supports the MARQUEE tag, GIF89a animation (v 2.0b3+), server push, and has promised support for JavaScript and Java in version 3.0. Netscape supports GIF89a animation (2.0b3+), JavaScript (2.0b4+), Java, server push, but not the MARQUEE tag. The most efficient of these methods are the MARQUEE tag, JavaScript, and GIF89a animation.


Microsoft's Internet Explorer supports the MARQUEE tag. MARQUEE's are the simplest and most efficient way to scroll text in a web page, but are only supported by Microsoft's browser. Here are some examples:

A right scrolling Marquee set for smooth scrolling
Just try and keep up with this one! Set to loop 4 times
An alternating scrolling Marquee set for medium scrolling
A scrolling Marquee set to slide once

Here's the HTML for the first one:


Marquees can be left or right-aligned and have a number of attributes. Many of the most common attributes are demonstrated here, for more details consult Microsoft's own documentation in the HTML area under extensions.


Pros: We've been using a simple JavaScript ticker on the WRL since early February. When updated daily, it's a quick way to give your readers highlights of the day's news. JavaScript is a good candidate for interface improvements.

Cons: JavaScript is currently Netscape specific. The endlessly scolling ticker can be annoying to some people. The ticker can jerk instead of scroll smoothly across the screen. URL's can be hard or impossible to see under the scrolling text. Applets can be buggy, most run out of memory if the page is left up too long. JavaScript applets are limited by its built-in security. Since JavaScript can't read or write to files it has more limited applications than Java (which can read files from the server it originates from).

Update! Chris Skinner, V.P. of Web Integration Systems, and author of the original scrolling JavaScript ticker, has solved the memory and URL display problems. This page now uses the new and improved JavaScript scrolling applet (let's call it version 2.0). Try putting your cursor over the above URL, see how it displays? Thanks Chris!

JavaScript tickers: the next BLINK?

We recently received a message from one of the top five sites on the Internet urging us to kill the JavaScript ticker, saying it's very annoying. This caused us to wonder. Is JavaScript the next BLINK? Is the ticker an eyesore or a useful feature? What do you think?

We want to hear from you because we care. Signed, the folks at

2-19-96 - We've received a number of responses, mostly negative on the ticker. We have removed it from the front page. We're still including it here for your experimentation, and possible improvement. Most people didn't like the fact that you can't see the URLs as you pass over hypertext, and that it can be jerky. If anyone has solved these problems, let us know.

3-3-96 - We received a message pointing out that we've neglected to show Microsoft Internet Explorer's MARQUEE. We've added coverage of this easy-to-use feature.

3-21-96 - Chris Skinner has solved the memory leak problem! The original author of the JavaScript ticker has done it again, and we thank him for it.

10-11-96 - There's a scrolling status bar killer! (although it didn't seem to work on ours :) Stop the Status Bar, from the JavaScript CookBook.

P.S. If, after all this you still want to use a JavaScript ticker, feel free to copy the code. The ticker only works for browsers which support JavaScript, i.e., Netscape 2.0b4+ (our log files show that nearly 80% of you are using Netscape to access the WRL). Just do a view source, and copy the applet. Make sure you initialize the function inside the HEAD and call it in the <BODY> tag. The new applet will not run out of memory and will display URLs properly, be sure to update yours if you still have the old ticker code.

More Javascript and MARQUEE information

Comments are welcome at

Created: Mar. 21, 1996
Revised: March 5, 1998