Typing Ticker JavaScript
(Another donateWare script from MRE Software)


     I found a nice ticker to use on my news page.  It would take RSS feeds and display the headlines as a typed line.  I liked the motion and the effect.  What I didn't like was the embedded Google Adsense code and tracking links.  On top of that I didn't have any control over whether those guys would be in business tomorrow and if my page would suddenly quit working.  The source code was hidden on their site and I hate to use content that is linked from another source.  I used it for a few days but it bugged me.

     So I figured, hey, I will find a typing ticker JavaScript and modify it to work with the RSSlib feed program I use already.  That way I will have the source and control of everything...  Well it was not that easy.  I found scripts that worked in text boxes with no html, scripts that only worked in some browsers, and scripts that didn't hardly work at all.  So dang-it, I'll write one!

     It has taken some research and work but I created a script that works like is should.  It takes lines of html code from an array and displays them like a maniac on a Selectric.  I added a function to my RSS program (in php on the server) that transferred the array down as JavaScript to my ticker page.  The ticker script then reads the array and displays it.  I ran the ticker in a small iframe just like the one below.  In my case, my html code included the CSS class definitions so the ticker code itself doesn't include anything like that.  It simply reproduces the html with all the attributes and the browser takes care of the formatting.  You can add styles and such as you like which is one advantage of having just the meat&potatoes code to begin with.

     The text box below contains a complete html page that is exactly the same as what is running the demo ticker.  It also contains an html comment that provides an example of how to use the iframe tag to display the ticker.  Enjoy the script and I hope you find it useful and educational!  And hey, I take donations.  I say, there is a donate button.  Look down at the bottom of the page.  See that thing?  Click.  Best deal around.  Think of the time you saved.

To download a complete package of files including the PHP program to implement a complete RSS news ticker





    Here is another example that is using the same ticker code but it is formatted inside a table and being fed by my RSS program on the server.  The CSS class for the links comes from the server inside the html tags.  The uses for this script and the ways it can be presented are endless!

 National Business News: Google News RSS 
To download a complete package of files including the PHP program to implement the ticker above click here.

If you find this code of value, donate a little to the cause.  Think of the time you just saved!

Questions / Comments?  Email me.

MRE Logo