Seeking pure Javascript RSS news ticker

Posted on 2004-11-09
Last Modified: 2008-02-01
I'm looking for a Javascript news ticker that can read an RSS/Atom feed directly and display clickable headlines in a horizontal scroller.

This one does what I'm after, except that it's Windows IE-specific - I need something W3C-style (or preferably both combined):

I've had a good google and looked around Sourceforge, but there doesn't seem to be anything around. There are several that claim "works with 1 line of Javascript", but they're actually Java applets.

Alternatively, if someone could rephrase this script in W3C style, that would be great (and worth more points).

Pointers please?
Question by:Squinky
    LVL 31

    Expert Comment

    web pages can not read streaming data with js alone, you need a plugin.
    LVL 25

    Author Comment

    I don't think that's true. RSS is not a continuous stream, it's just a static resource that you request via a simple HTTP transaction, and as such is easily handled using XMLHTTPRequest objects (even asynchronously) from JS, and its content is all plain XML, which is readily parsed by JS dynamically. i don't see anything stopping this from working.

    I've found JS-only examples that generate lists of news items directly from RSS feeds, and there are tickers around for displaying arbitrary text - what I'm after is something that combines the two. My JS is just not up to it...
    LVL 31

    Expert Comment

    the term "feed" left my with the impression you wanted to stream the data. If it is static resource it may be possible but I am sorry I do not know how. :(
    LVL 1

    Accepted Solution

    Hi Squinky,

    Funny ,the link you posted is not so much away from mine,... :-D

    Here you will find a tip on how you could write a Jscript that works in, quote :" This is a DOM script that will work in 5th generation browsers like Internet Explorer 5+, Mozilla/Netscape 6+, Opera 7+, Safari 1.2+ and ICEbrowser"
    If that's not what you are asking for,.... please do specify.

    So, ... if you 're stuck in javascript on this, I can write you the code, but again, please be more specific. :-D

    LVL 25

    Author Comment

    That's a nice solution for the reading part, and it's good that it has an RSS solution too - the createTable function would need to be rewritten build a ticker instead, much like the example I found. I'm not bothered about compatibility beyond IE, Mozilla and Safari - people using old browsers can just do without it!

    Apple has a good guide on the XMLHTTPRequest object here:

    So, I do now seem to have all the pieces - but it remains a matter of putting them together - fancy having a go? I'll increase points for that!

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
    In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now