LemonInflux Posted November 24, 2007 Share Posted November 24, 2007 How do I say, every 5 seconds, run ajaxFunction? At the moment, I'm using: <input type="text" onKeyUp="ajaxFunction();" name="username" /> That's fine and all, but...A) I don't want it in a text box, and B) it only works when you release a key. Any help appreciated, Tom. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 24, 2007 Share Posted November 24, 2007 try this: <script language="javascript"> function ajaxFunction() { // ajax code here setTimeout("ajaxFunction()", 5000); } window.onload=function() { ajaxFunction(); } </script> 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.