Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.