I have an XHR call getting a date for me, but can't seem to pass it into the page - i know its school-boy stuff, but its driving me mad.
I just need to pass the date from the XHR call to a variable to be inserted via document.write...
Anyone ?
thanks in advance.
B
var upDated
function getUpdated(){
xmlhttp.open("HEAD", "MBP_box.JPG",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
upDated = xmlhttp.getResponseHeader("Last-Modified");
alert(upDated);
}
}
xmlhttp.send(null)
}
and in the body....
document.write(upDated);