LemonInflux Posted October 28, 2007 Share Posted October 28, 2007 OK, on my page, I have a piece of PHP code: <?php include('file.php'); ?> I want to repeat this action every 2 seconds. I'm presuming this is javascript, and would work much in the same way as refreshing one part of a page. So, how could I do this? I know nothing about javascript, so any help is greatly appreciated Tom Link to comment https://forums.phpfreaks.com/topic/75078-repeat-action-every-2-seconds/ Share on other sites More sharing options...
lighton Posted November 3, 2007 Share Posted November 3, 2007 To be able to do this you would run an ajax request using the setInterval() method. however if you are unfamiliar with javascript or ajax, it would be a task to explain how to do it on a forum. It might be an idea to use a premade library such as scriptaculous or learn javascript its a pretty cool language when you get into it. Link to comment https://forums.phpfreaks.com/topic/75078-repeat-action-every-2-seconds/#findComment-383951 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.