I know this question has been asked many times and it is due to same-origin policy however My files are normal .html files on my computer hard drive on the same folder and I still get this error!
<script>
$(function() {
$("#some").load("include.html");
});
</script>
And include.html only has one <p>
tag which contains some text. I have downloaded jQuery and included it! I can run other scripts but this one causes the following error:
Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. file:///C:/Users/MYUSER/Documents/code/include.html
XMLHttpRequest cannot load file:///C:/Users/MYUSER/Documents/code/include.html. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
As you can see they are in the same folder but I still get this error. I user Chrome as browser!
some
is the id
of the div tag in the body of my page.