Here is my code. when I click on ‘click here’ link the html file is not loading inside the div
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#click").click(function(){
$("#loadthis").load('timeless_op1.html');
});
});
</script>
</head>
<body>
<div id="loadthis">Load the html file here</div>
<div id="click">Change Content</div>
</body>
</html>
Have checked out, here what I’ve got like a reason.
My test code is:
When I placed it out of webroot of my site, it loads in Mozilla, but not loading in Opera and Chrome. I think that browsers doesn’t work with network function if you’re opening local file, or works but different. In any case it works if it’s placed into document root dir of any site. In other words, if you open it in you browser by url:
file://localhost/C:/Users/devdRew/Desktop/test.htm, Mozilla works fine, others – not. If you open it like:http:\\somemytestdomain\test.htm, then everything works perfectly.