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. Quote Link to comment https://forums.phpfreaks.com/topic/217568-auto-refresh-question/ 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.