Jump to content

Auto Refreshing page problems


LOUDMOUTH

Recommended Posts

Sorry about that :)

 

I have a homepage that uses meta refresh, to refresh a chatbox  on the page.  But when people stay on the page with the Chatbox it shows them as active every second in my online now sections of the page.  Is there a way to stop this refreshing from happening? Or a way to stop the homepage from refreshing at all?

 

 

this is the only refresh code I can find in my site. 

 

function mrefresh($url, $time="1"){
echo '<meta http-equiv="refresh" content="'.$time.';url='.$url.'">';
}

 

If there isnt a way to stop the refresh, is there a code I can use in my site to make it so people cannot refresh with out a prompt?

 

Thank you for taking the time to help me out

 

 

Yes there are 2 ways to stop refreshing:

 

1. Use Ajax to only refresh part of the page. In your case the part is 'Chat box'. It's very easy. Enclose your Chat Box code in a <div id='chatbox'></div> tag and refresh this div automatically using Ajax.

 

2. If you don't want to use Ajax, then you can use IFrames and meta refresh you chat box page.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.