wezly Posted November 2, 2010 Share Posted November 2, 2010 Hi there, I have a very basic php chat system storing information in my db. I have made a chatlog to display the information and I would like to have that information update live with an autoscroling box, instead of having to use iframes with. <script> setTimeout("window.location.replace('chatlog.php')",700); </script> I have looked at a few tutorials but they all seem to build their own systems, nothing about integration with a current system. I have also fond solutions that refresh divs but try as I might, this does not seem to work. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> <script> var auto_refresh = setInterval( function() { $('#log').fadeOut('slow').load('chatlog.php').fadeIn("slow"); }, 2000); //2000 Milliseconds or 2 seconds </script> any help very much appreciated. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/217568-auto-refresh-question/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.