How To Skip "Cross Origin Requests" Using JavaScript/JQuery? -


i trying read .xml file feed using javascript/jquery in pc show data on browser. can view feed.xml file online saved googleblogxmlfeed. when tried read via following codes in index.html file in same folder feed.xml file is...

<script src="http://code.jquery.com/jquery-2.2.0.min.js"></script> <script>     $.ajax({         url: "feed.xml",         success: function(xml){              var xmldoc = $.parsexml(xml),             $xml = $(xmldoc),             title = $xml.find("title").text();             alert(title);         }     }); </script> 

but on opening file in chrome, getting below error.

xmlhttprequest cannot load file:///d:/feed.xml cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

i not using server/host wamp,iis,xamp etc. there way remove error , read file data normal xml...???

no. chrome not allow cross-origin requests files loaded file system. see question has been asked before.

problems jquery getjson using local files in chrome


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -