I have some AJAX code I would like to keep going every 1 second. I added this into my HTML page to see if it would keep updating on it's own, but I have to refresh to see the change.\[code\] while (1) { getTime(); }\[/code\]This didn't work on to keep updating, it never updated my text. What is a way of having Ajax do something over and over?Here is getTime():\[code\] function getTime() { if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","auction.php?getTime=1",true); xmlhttp.send(); setTimeout(getTime, 1000); }\[/code\]Thanks!