I'm new with programming and I was testing out some simple ajax code with JQuery:
$('document').ready(function(){
$.ajax({
url: "AwesomeText.html",
type: "GET",
datatype: "Html"
})
.done(test)
});
function test(result){
$("p").append(result);
}
It's simple code, I use Brackets for coding and every time I run the code the page opens perfectly fine, the html content is there but the ajax content isn't, so ajax doesn't run for some reason.
This is the file path on chrome's address bar when I run bracket: http://127.0.0.1:*****/JQurtywAjax.html I replaced some numbers with stars..
and then when I run the page from its own directory I get the actual file path like this: file:///C:/Users/comp/Documents/JQurtywAjax.html and then ajax works here so I know the problem is from Brackets' file path..
how do I fix this ajax problem with brackets and why does it display a different file path?