xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var valr5 = this.responseText;
document.getElementById("countdown").innerHTML = valr5;
if (valr5 == '00:00'){
window.location = "index.php";
}
}
};
On Ajax call, in return responseText, I am getting remaining minutes and seconds in this format '1.30'. (it can be anything like '00.28' in place of '1.30')
I wanted decrement it by 1 till '00:00' but with accuracy of 1 sec and show that countdown in "countdown" div
Please can anyone guide me on this.