1 Replies - 619 Views - Last Post: 27 June 2012 - 07:00 AM

#1 janthiemen  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-June 12

How to make RSS reader show mediagroup content

Posted 25 June 2012 - 04:41 AM

I've build a simple rss reader, using jquery mobile. It uses google feed API to return the feed as JSON. Now I want it to also show the content in the media tags, but I don't know how. I've tried this:

for(i=1; i<=maxLength; i++){
document.write(
'<div data-role="page" id="article' + i + '">' +
'  <div data-role="header" data-position="inline">' +
'    <a href="#list" data-role="button" data-icon="home" data-back="true">Home</a>' +
'    <h1 id="articleHeader' + i + '">&nbsp;</h1>' +
'    <a href="#" id="openButton' + i + '" data-role="button" data-icon="plus"' +
'      class="ui-btn-right" rel="external">Open</a>' +
'  </div>' +
'  <div data-role="content">' +
'    <div id="articleContent' + i + '" class="articleContent"></div>' +
'    <div id="mediaContent' + i + '" class="mediaContent"></div>' +
'  </div>' +
'</div>'
);
}

$(function(){
getOnlineFeed('http://feeds.reuters.com/reuters/USVideoBreakingviews');
});

var listEntries = function(json) {
if (!json.responseData.feed.entries) return false;
$('#widgetTitle').text(json.responseData.feed.title);
var articleLength =json.responseData.feed.entries.length;
articleLength = (articleLength > maxLength) ? maxLength : articleLength;
for (var i = 1; i <= articleLength ; i++) {
var entry = json.responseData.feed.entries[i-1];
$('#link' + i).text(entry.title);
$('#articleHeader' + i).text(entry.title);
$('#openButton' + i).attr('href', entry.link);
$('#articleContent' + i).append(entry.content);
$('#mediaContent' + i).append(entry.mediaGroup);
}


But this ain't working, and I just don't get why, I was hoping someone here could help me with getting this working.

Thanks in advance,
Jan Thiemen Postema

Is This A Good Question/Topic? 0
  • +

Replies To: How to make RSS reader show mediagroup content

#2 denting5  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 84
  • Joined: 03-June 12

Re: How to make RSS reader show mediagroup content

Posted 27 June 2012 - 07:00 AM

I myself cannot quite figure out the problem here, but I think that you should consider implementing this in PHP. Adding RSS functionality to that is far simpler. The Information You Need
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1