I've been struggling to get this to work for a while. Basically I want to get information from Yahoo via the YQL resource. I have it working for all browsers except IE. (IE8 is the only one I've tested, but it's a must).
$.ajax({
type: 'GET',
dataType: 'jsonp',
crossDomain: true,
url: 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%3D%22http%3A%2F%2Ffinance.yahoo.com%2Fwebservice%2Fv1%2Fsymbols%2Fyhoo%2Fquote%3Fformat%3Djson%22%20and%20itemPath%20%3D%20%22list.resources.resource.fields%22&format=xml&callback=?',
success: function(data) {
console.log(data);
name = $($(data.results[0]).find('name')[0]).text();
symbol = $($(data.results[0]).find('symbol')[0]).text();
price = $($(data.results[0]).find('price')[0]).text();
price = parseInt(price);
$('body').append(name + '; ' + symbol + '; ' + price);
}
});
The YQL request (for the console):
select * from json where url="http://finance.yahoo.com/webservice/v1/symbols/yhoo/quote?format=json" and itemPath = "list.resources.resource.fields"
It's a simple Ajax get call, but I can't seem to get access for IE8 to do anything with the data. (The return dataType that you see in the URL doesn't matter-- I've tried it with both XML and JSON). Am I missing something? Or is this even possible?