• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1242
  • Last Modified:

Seeking pure Javascript RSS news ticker

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):

http://www.howtodothings.com/showarticle.asp?article=733

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?
0
Marcus Bointon
Asked:
Marcus Bointon
  • 2
  • 2
1 Solution
 
GwynforWebCommented:
web pages can not read streaming data with js alone, you need a plugin.
0
 
Marcus BointonAuthor Commented:
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...
0
 
GwynforWebCommented:
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. :(
0
 
mayo73Commented:
Hi Squinky,

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

http://www.howtocreate.co.uk/tutorials/jsexamples/importingXML.html

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

Marko
0
 
Marcus BointonAuthor Commented:
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:

http://developer.apple.com/internet/webcontent/xmlhttpreq.html

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!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now