Below is the code I am working on:
<script type="text/javascript>
$(".link").click(function(){
var id = this.id;
if(id == 'b1'){
$( "#content" ).load( "test.html", function(){
alert('Successfully loaded!');
});
}
});
</script>
All my files are located on localhost as I am using it for educational purposes.
However, upon clicking the B1 button, Google Chrome displays the following error message:
Error Message:
OPTIONS file:///E:/mypath/folder/page.html No 'Access-Control-Allow-Origin'
header is present on the requested resource. Origin 'null' is therefore not allowed access.