Sure. So I’d probably go about it with this approach and work from there:
Try starting with the HelloWorld module and work from there. I’d start with putting this in the GetDom() function and return the contents of whatever you want displayed in the wrapper by appending it.
var wrapper = document.createElement("div");
var xmlhttp = new XMLHttpRequest();
var url = "http://ip:8889/status.xml";
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var results = JSON.parse(xmlhttp.responseText);
wrapper.innerHTML = parseResults(results);
}
};
xmlhttp.open("GET", url, true);
xmlhttp.send();
return wrapper;
function parseResults(results) {
var nodes = results.childNodes;.
var resultsContainer = document.createElement("div");
var out = "";
var i;
for(i = 0; i < results.length; i++) {
var resultWrapper = document.createElement("div");
resultWrapper.innerHTML = x[i].nodeName + ": " + x[i].childNodes[0].nodeValue + "<br>";
resultsContainer.appendChild(resultWrapper);
}
return resultsContainer;
}
I’m a bit of a beginner too, but I think that might give you something to start with?