Results 1 to 2 of 2

Thread: Multiple feeds?

  1. #1
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Multiple feeds?

    1) Script Title: RSS Display Boxes

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ybox/index.htm

    3) Describe problem: I'm a new scripter. (Duh.) I tried to use the javascript code twice in one page. Is that permitted? One works, the other does not. The one that doesn't work used to work fine -- until I added the second one. Now only the second one works. (The one that works comes first in the HTML code, incidentally.)

    Here is the code I used. For this one I only want one RSS entry--the most recent--to show up. This is the one that currently works:

    <script type="text/javascript">
    var showbbc=new rssdisplaybox("AFN Hawaii", "rssid", "rssclass")
    showbbc.set_items_shown(1) //show 1 entry from feed
    showbbc.start() //Required: start script
    </script>

    And this is the one that used to work, until I added the one (above) to the page, higher up in the page HTML. For this one I want only three (or maybe five) feed entries, and I really only want titles:

    <script type="text/javascript">
    var showbbc=new rssdisplaybox("AFN Hawaii", "rssid", "rssclass")
    showbbc.set_items_shown(3) //show 3 entries from feed
    showbbc.start() //Required: start script
    </script>

    Any help on this would be greatly appreciated.

    Fortunately, I have acopy of the page when it worked with the first script, and another copy of it with both scripts.

    Only one script, working fine:
    http://afnhawaii.net/index_rss.htm

    Two scripts, only one of them works:
    http://afnhawaii.net/index_rss_1.htm

    I know I also need to clean up the CSS so it looks a little better.

    Thanks for any help.

    Chris Vadnais
    chrisvadnais [at] mac [dot] com

  2. #2
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Got it

    Had to change the variable. Duh.

    Thanks. Here's how it works:

    <script type="text/javascript">
    var showbbc=new rssdisplaybox("AFN Hawaii", "rssid", "rssclass")
    showbbc.set_items_shown(1) //show 1 entry from feed
    showbbc.start() //Required: start script
    </script>

    Second one:

    <script type="text/javascript">
    var showbbc2=new rssdisplaybox("AFN Hawaii", "rssid", "rssclass")
    showbbc2.set_items_shown(3) //show 3 entries from feed
    showbbc2.start() //Required: start script
    </script>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •