Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
function request(url, callback) {
var req = new XMLHttpRequest();
req.open('GET', url, true);
req.onload = function() {
if (req.status >= 200 && req.status < 400) {
if (callback) callback(req.responseText);
}
};
req.send();
}
request('worker.xml', function(xml) {
document.getElementById("IDWorker").innerHTML = xml.getElementsByTagName("IDWorker")[0].childNodes[0].nodeValue;
document.getElementById("LastName_Worker").innerHTML = xml.getElementsByTagName("LastName_Worker")[0].childNodes[0].nodeValue;
document.getElementById("FirstName_Worker").innerHTML = xml.getElementsByTagName("FirstName_Worker")[0].childNodes[0].nodeValue;
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question