Kryptix Posted February 16, 2010 Share Posted February 16, 2010 I want to update the user online count every second, how would I run a timer within JS/Ajax? Quote Link to comment Share on other sites More sharing options...
trq Posted February 17, 2010 Share Posted February 17, 2010 setInterval(function() { // code }, 1); Quote Link to comment Share on other sites More sharing options...
Kryptix Posted February 17, 2010 Author Share Posted February 17, 2010 Thank-you. Quote Link to comment Share on other sites More sharing options...
isedeasy Posted February 19, 2010 Share Posted February 19, 2010 Just to warn you, the above code will run every millisecond (not good). Change the 1 to 1000 for 1 second. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.