I have a piece of code which works well in Mozilla but doesn't in Chrome.
function yoxi(){
var xhr = new XMLHttpRequest;
xhr.open("GET", "yoxi.php", false);
xhr.send(null);
}
function getirus(){
var xhr = new XMLHttpRequest;
xhr.open("GET", "getirus.php", false);
xhr.send(null);
document.getElementById('onlineus').innerHTML=xhr.responseText;
}
setInterval(yoxi, 5000);
setInterval(getirus, 5000);
setinterval
doesn't work in Chrome repeatedly.
What may be the problem?