Quantcast
Channel: Why calling RSS feeds from ajax not working? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Why calling RSS feeds from ajax not working?

$
0
0

I am trying to code this RSS feed of football.

but when I am calling it, its giving some error as below

XMLHttpRequest cannot load http://ibnlive.in.com/ibnrss/rss/sports/football.xml.

No 'Access-Control-Allow-Origin' header is present on the requested resource.

Origin 'http://localhost:8888' is therefore not allowed access.

What is the problem with my call??

My code for the call is as under

$.ajax({    type: "GET",    url: "http://ibnlive.in.com/ibnrss/rss/sports/football.xml",    dataType: "xml",    success: xmlParser});function xmlParser(xml){    console.log(xml);    var xmlcode='';    $(xml).find('item').each(function(){        xmlcode+="<li>"+$(this).find('title').text()+"</li>";    });    $('.headline-ul').html(xmlcode);}

Is there anything else needed to use that field?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images