The revolutionary project management tool is here! Plan visually with a single glance and make sure your projects get done.
$.get('videoquest.aspx?rss='+list,function(xml){ xp=xml; desc=new Array(); var thm=new Array(); var video=new Array(); var title=new Array(); var pure = new Array(); var runtime = new Array(); var item = new Array(); $(xp).find('blip\\:smallThumbnail').each(function(){ var id_text = $(this).text(); alert (id_text); // shows nothing ... thm.push (id_text); }); //close each $(xp).find('enclosure').each(function(){ var id_text = $(this).attr('url'); alert (id_text); // shows all the video name video.push (id_text); }); //close each ....
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
$(xp).find("item > *").each(function(){
var nodeName=$(this).get(0).no
//see if nodeName starts with blip
if( /^blip/.test(nodeName) )
{
//change the colon to an underscore
data[ nodeName ] = $(this).text();
}
});
alert(data["blip:user"]);
alert(data["blip:userid"])
//or you can iterate:
for( var k in data)
{
alert( k + "=" + data[k]);
}
I put in the code, but it seems this snippet did not save results to the array data. Is .test a jquery standard function? I do the alert( k + "=" + data[k]); and nothing to show. appreciate your help
if( /^blip/.test(nodeName) )
{
//change the colon to an underscore
data[ nodeName ] = $(this).text();
}
(Technically, it is an object, not an array) Where did you declare var data={}? Try putting it OUTSIDE of the .get() -ex:
var data={};
$.get('videoquest.aspx?rss
>>Is .test a jquery standard function?
No! It is a method of the javascript RegExp object.
With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.
Regards
I change the data{} out of the $.get and get data{} saved with the data in FF, in IE just simply blank. no error either. the xml feed is coming from blip.tv, so I think the format is correct. I check the source and the namespace is defined correct as you described. FF has no problem to parse the file and display all the data I need. Do you think I need to use .ajax?
Please take a look at this url
with FF you will see the display of data{} and the final table. with IE just a blank table.
the proxy page is in
I tried to change the tag name in proxy aspx to make it no colon: , FF still works and IE can see the tag but cannot read the this.text() out. so I will have a table with the pic blank and only the info without blip.
Appreciate your help
here is the url that removed the colon from the tag, IE cannot read the $(this).text(), can you find a way for IE to be able to read the text()? Thanks
Open in new window
Content-type: text/xml
Even if that manages to get rid of the parseError, it still does not understand "item > *". I think you will need to end up handling IE differently. See attached code:
Open in new window
your code is perfect in IE now. I tried to put the below code to make it work on both ie and FF, but obviously my understanding is not enough. If not too complicated can you make it work ? the error message I have is objXML.documentElement.sel
try //Internet Explorer
{
var objXML = new ActiveXObject("MSXML.DOMDo
objXML.async="false";
objXML.load("");
objXML.setProperty("Select
}
catch(e)
{
parser=new DOMParser();
objXML=parser.parseFromStr
}
var items = objXML.documentElement.sel
...
Open in new window
Open in new window