PDA

View Full Version : gAjax RSS Pausing Scroller issue



jgrocock
10-01-2010, 10:45 AM
gAjax RSS Pausing Scroller

http://www.dynamicdrive.com/dynamicindex18/gajaxpausescroller.htm

We I add 1 instance of the scroller to the page everything works okay.
When I add a second instance of the scroller (exactly the same code and RSS feed) it only displays one of the scrollers and the other one one hangs at "Initialising RSS Scroller..."

Any pointers appreciated as to how to add multiple scrollers to a page.
Thanks

ddadmin
10-01-2010, 06:31 PM
Did you remember to get each instance a unique variable name when initialing them? For example:


var cssfeed=new gfeedpausescroller("example1", "example1class", 2000, "_new")
cssfeed.addFeed("CSS Drive", "http://www.cssdrive.com/index.php/news/rss_2.0/") //Specify "label" plus URL to RSS feed
cssfeed.displayoptions("date") //show the specified additional fields
cssfeed.setentrycontainer("div") //Wrap each entry with a DIV tag
cssfeed.filterfeed(10, "date") //Show 10 entries, sort by date
cssfeed.entries_per_page(1)
cssfeed.init()

var cssfeed2=new gfeedpausescroller("example2", "example1class", 2000, "_new")
cssfeed2.addFeed("CSS Drive", "http://www.cssdrive.com/index.php/news/rss_2.0/") //Specify "label" plus URL to RSS feed
cssfeed2.displayoptions("date") //show the specified additional fields
cssfeed2.setentrycontainer("div") //Wrap each entry with a DIV tag
cssfeed2.filterfeed(10, "date") //Show 10 entries, sort by date
cssfeed2.entries_per_page(1)
cssfeed2.init()