CSSjunkie
02-12-2008, 02:04 AM
Hi first post here, so here goes
My problem is that I want to use javascript to every now and then check with the server and update, but the main part is that I'm pretty sure that the way I'm doing this isn't right, or there isn't a right way. I'm not too sure.
function foo(){
// do some stuff
setTimeout("foo()",2000);
}
is this a good way to have a function constantly be called?
My problem is that I want to use javascript to every now and then check with the server and update, but the main part is that I'm pretty sure that the way I'm doing this isn't right, or there isn't a right way. I'm not too sure.
function foo(){
// do some stuff
setTimeout("foo()",2000);
}
is this a good way to have a function constantly be called?