Results 1 to 1 of 1

Thread: how to insert variable into a funtion

  1. #1
    Join Date
    Mar 2011
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question how to insert variable into a funtion

    edit: opps.. 'function' not 'funtion'!

    Hi,

    I'm playing around trying to learn jquery from the wrong end and my general ignorance is starting to show...
    I can't seem to figure out how to add a variable or in fact any kind of text string to the code below.

    I'm trying to make an edit to an jquery RSS feed plug in:
    gfeedfetcher
    The bit in red is a variable i want to add and inset where the green text is as a URL. I just don't seem to know enough about the syntax needed to make it work. Is there a good way of adding the variable into the addFeed function?

    Code:
    <script type="text/javascript">
    var newsfeed=new gfeedfetcher("rssfeeds", "rssfeedsclass", "_new")
    var insertRSS=localStorage.getItem('RSS1')
    newsfeed.addFeed("Ormiston School News", "http://www.ormistonsandwell.org.uk/RSS/News/");
    newsfeed.addFeed("RSS FEED 1", "http://feeds.bbci.co.uk/news/science_and_environment/rss.xml");
    newsfeed.addLocalFeed("Weather Feed", "http://newsrss.bbc.co.uk/weather/forecast/190/Next3DaysRSS.xml");
    newsfeed.addLocalFeed("Dynamic Feed", RSSfeedOne);
    newsfeed.displayoptions("label datetime snippet");
    newsfeed.setentrycontainer("p");
    newsfeed.filterfeed(10, "date");
    newsfeed.init();
    </script>
    The actual addFeed function:
    gfeedfetcher.prototype.addFeed=function(label, url){
    this.feedlabels[this.feedlabels.length]=label
    this.feedurls[this.feedurls.length]=url
    }
    thanks!
    Last edited by danskkr; 03-28-2011 at 09:37 PM.

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
  •