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++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -