I'm fairly new to the whole "backend" development.I set up a localhost wrote my html request with no visible syntax errors, but my new content still wont update the page.
<!DOCTYPE html>
<html>
<head>
<title>Loading Html With AJAX</title>
</head>
<body>
<header><h1>Maker Bus</h1></header>
<section id="content"></section>
<script type="text/javascript" src="/Applications/MAMP/htdocs/loadingHtml.js"></script>
</body>
</html>
var xhr= new XMLHttpRequest();
xhr.onload=function(){
//Server Check
if(xhr.status==200){
document.getElementById('content').innerHTML=xhr.responseText;
}
};
xhr.open('GET' ,'http://localhost:8888/data.html',true);
xhr.send(null);