views:

832

answers:

2

I need to create a news ticker that is updated via an RSS feed. Any ideas on how to implement this?

I would prefer Javascript but any language is acceptable.

+1  A: 

There are are several good examples of this on this DynamicDrive page, although one of the requirements is that you can run PHP on your site. PHP here is used to fetch the actual feeds and allow your ticker to access them locally via an AJAX call.

There are several other projects out there built on JQuery, and the basic approach taken by each is:

  • use a PHP (or ASP.net) script to fetch the feed to your server.

  • access this local file via repeated AJAX calls, making use of setTimeout

  • update the display (ticker) with latest data fetched

The file is fetched to your local server for the AJAX calls due to the Same Origin Policy:

It prevents a document or script loaded from one "origin" from getting or setting properties of a document from a different "origin".


Further examples include:

ConroyP
A: 

If you really have a nice niche market where your news ticker could be very popular, you might want to 'be on their desktop' and develop a widget with Adobe Air.

You can create a nice scrolling ticker then with any javascript you like (or flash/flex, that's supported too)

SchizoDuckie