FeedNav - an AJAX RSS displayer

This is part of the AJAX chapter of my upcoming book and I'll be happy to get some feedback if this is something worth to have.

Click any of the feed URLs on the left and there'll be an AJAX request loading the latest 5 feed items of that site and displaying it below the link.

You can download the script and all files as a zip.

The feed navigation is a simple link list with the ID "feeds".

You can configure the script to your needs via the config file feednavcfg.js:

feednavcfg={
  // id of feed menu
  feedsID:'feeds',
  // loader image
  loadingMessage:'<li><img src="indicator.gif" alt="loading" /></li>',
  // Server error message
  serverError:'<li class="error">%error%</li>',
  // Connection error message
  requestFailed:'<li>Oops, connection error: %error%</li>',
  // feed item display. You need to provide a p with a class to hide for 
  // the description!
  item:'<li><p><a href="%url%">%name%</a></p><p class="desc">%description%</p></li>',
  // class to hide the item
  itemHidden:'desc',
  // class to show the item
  itemShown:'showdesc',
  // label for the link to the blog
  itemFullLink:'More about: ',
  // label for the closing link 
  closeLabel:'Close',
  // amount of entries
  itemCount:5,
  // name of the server script
  serverScript:'loadrss.php?url=',
  // if there is a timeout
  timeoutMessage:'the request took too long',
  // wait 4 seconds for timeout
  timeout:4000
}

You need a server with PHP to load the third party feeds and it needs to be able to load third party content via fread.

Leave comments on the blog