tags:

views:

30

answers:

0

Hi, how can i fixed this error?

result.feed is undefined
[Break on this error] for (var i = 0; i < result.feed.entries.length; i++) 

the code

function apg(rss_url,results)
{

  var feed = new google.feeds.Feed(rss_url);
  feed.setNumEntries('99');
  feed.load(function(result) {
    if (!result.error)
    {    
      for (var i = 0; i < result.feed.entries.length; i++)
      {
        var entry = result.feed.entries[i];
        var attributes = ["title", "link", "publishedDate", "content", "contentSnippet"];
        title = entry[attributes['0']];

      }
    }
  });
}

Thanks in advance! Peter