Hello,

Im adapting a MRSS feed to display some of the latest videos added to
the feed on my company sites;

http://publish.vx.roo.com/g6publish/common/playlist/rssgeneratorportal.aspx?SiteId=cb519624-44a2-4bf7-808b-3514d34e96e4&Format=flash&v=3&thumbnailtypecode=wide_small&channel=Latest+Videos&rsstype=mrss

The code Ive constructed has been a simple copy of one of the XML
examples with some simple additions of jquery to render the result.

However Ive found that in Firefox 2 and also Chrome I am unable to get
the url attribute value of the media:thumbnail node  with the error

item.getElementsByTagName("media:thumbnail")[0] has no properties

appearing in Firebug.

The code I am using for the feedloaded section;

function feedLoaded(result) {
  if (!result.error) {
    // Get all items returned.
    var items = result.xmlDocument.getElementsByTagName('item');
    //clear out results div.
    $(".video<%inf_pageid%>").empty();
    $(".video<%inf_pageid%>").append('<h3>Latest Videos</h3>');
    // Loop through our items
    for (var i = 0; i < items.length; i++) {
      var item = items[i];
      // Get the title from the element.  firstChild is the text node
containing
      // the title, and nodeValue returns the value of it.
      var title = item.getElementsByTagName("title")
[0].firstChild.nodeValue;
      var link = item.getElementsByTagName("link")
[0].firstChild.nodeValue;
      var descript= item.getElementsByTagName("description")
[0].firstChild.nodeValue;
      //var temp= item.getElementsByTagName("media:thumbnail")[0];
      //alert(temp);
      //var thumb = temp.attributes.getNamedItem("url").value;
      var thumb = item.getElementsByTagName("media:thumbnail")
[0].getAttribute("url");
      //alert(ff2);
      //create html string of complete listing
      var html = '<div class="item"><div class="preview-image"><a
title="' + title + '" href="'+ link + '"><img alt="' + title + '
image" width="128" height="72" src="' + thumb + '"/></a></div><h4
width="20"><a title="' + title + '" href="' + link + '">' + title + '</
a></h4><div class="text">' + descript + '</div></div>';
      //clear and append the output of string to video div
      $(".video<%inf_pageid%>").append(html);
    }
  }
}


Any ideas why this doesnt work in FF2 or Chrome?

Thanks in advance,
BjP




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to