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. Link to comment https://forums.phpfreaks.com/topic/78697-really-basic-question/ 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> Link to comment https://forums.phpfreaks.com/topic/78697-really-basic-question/#findComment-398355 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.