I have 2 html files named host.html and test.html I have tried so hard but I can't get to load test.html file as the content of mydiv in host.html I have tried:
$("#myDiv").load("test.html");
but it fails; then I tried using the following ajax method to get the file:
$.ajax({
type: "GET",
url: "test.html",
error: function (xhr, statusText) { alert("Error: " + statusText); },
success: function (msg) { alert("Success: " + msg); }
});
But sadly I am always hitting the error ! Both host.html and test.html are on in the same folders! What am I doing wrong?! Please help
Cheers!