Hi I'm trying to output a response which is xml but its only displaying in the alert box and not in the div and I'm not sure what I'm doing wrong any idea's
var request;
function callback() {
if (request.readyState == 4) {
try {
if (request.status != 200) {
alert('error');
} else {
// ok, process...
document.getElementById("myDiv").innerHTML= request.responseText;
alert("got data: "+request.responseText);
}
} catch(e) {
alert('error');
}
}
}
function test_get() {
request = new CrossXHR();
request.onreadystatechange = callback;
request.open('GET', 'http://www.gamerservices.co.uk/jackpot_obs_xml.xml');
request.send();
}