function load() { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if(this.readyState == 4 && this.status == 200){ console.log("loaded"); console.log(this.responseText); var res = JSON.parse(this.responseText); var strCatalog = ""; res.forEach(manga => { strCatalog += '\ \ \ \ \

'+manga["title"]+'

\

Scanlation: ?

\

Status: ?

\

Chapters: ?

\

Last update: ?

\

\ Link:\ reader\

\ \ '; }); console.log(strCatalog); document.getElementById("titles").innerHTML = strCatalog; } } xmlhttp.open("GET", "/db.json", true); xmlhttp.send(); } document.onreadystatechange = load();