Good day to all!
I am seeking help with this link given http://dtcwebmedia.com/cms/bridegal/api/get_category_posts?id=96
Can anyone teach me how to parse and display this using html , im having hard time displaying it or maybe retrieving it.
i've tried different tutorials but it seems im having a hard time displaying it. can anyone help me?
heres the code
<!DOCTYPE html>
<html>
<body>
<div id="id01"></div>
<script>
var xmlhttp = new XMLHttpRequest();
var url = "http://dtcwebmedia.com/cms/bridegal/api/get_category_posts?id=96";
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var myArr = JSON.parse(xmlhttp.responseText);
myFunction(myArr);
}
}
xmlhttp.open("GET", url, true);
xmlhttp.send();
function myFunction(arr) {
var out = "";
var i;
for(i = 0; i < arr.length; i++) {
out += arr[i].status +
arr[i].count + '</a><br>';
}
document.getElementById("id01").innerHTML = out;
}
</script>
</body>
</html>
i appreciate your help, thank you