2

This has been asked alot but it's mostly about json files. I have this online xml file from my website that I want to use on a subdomain from my website but I get following error:

XMLHttpRequest cannot load xml-file. No 'Access-Control-Allow-Origin' header is present on the requested resource

This is the code I use to load xml file:

url = "http://www.worldofleonalewis.com/duets/rss.xml";
    $("#video-detail").empty()
    $("#videos").empty();
    $.ajax({
        type: "GET",
        dataType: "xml",
        url: url,
        success: function (xml) {
 }

The only solution I have atm is to copy the entire xml file and save it as an xml file but as the xml file will be updated as soon as I post new content then it seems crazy work.

I've read about json and jsonp solutions but I can't get a json file from this, only xml.

xml file

user2759675
  • 181
  • 2
  • 10
  • http://stackoverflow.com/questions/19821753/jquery-xml-error-no-access-control-allow-origin-header-is-present-on-the-req--Please refer this question. – webcoder Mar 06 '14 at 11:50
  • 1
    Yes, thanks. Hadn't read that one. Shortening the path completely worked! – user2759675 Mar 06 '14 at 12:06

0 Answers0