Menu
Hello I am displaying some time sensitive information on a page, in this case the score of a basketball game. I have an ajax function called getScore, which hits the database, grabs the score, and shows it on the page. I am trying to make it so that the getScore function runs every minute to pull the score, but I cant seem to be able to do so… Here is my code:
[CODE]
function getScore(){
//do some ajax processing, and change the page to show up to date score
}
function main(){
while(true){
setTimeout(‘getScore();’, 50);
}
}
window.onload = main;