Page 1 of 1

refresh data from msyql every 6 seconds

Posted: Sun Jul 19, 2009 7:52 pm
by dsick
im creating a log for my site, information from the log will be refreshed every 6 seconds.. the current method im using is a meta refresh.. that refreshes the page every 6 seconds... however this refreshes the whole page.. the only thing im wanting to refresh is the data from mysql..

if(isset($_GET['logs'])) {

echo'<meta http-equiv="refresh" content="5"/>';

?>

i show my data here, the meta refreshes every 6 seconds which i think looks bad because the page its self will refresh every 6 seconds, not to mention that the link keeps flashing in the status bar and on the tabs every 6 seconds... looks very annoying.

this could work if i couldn't see the link in the status bar and tab everytime it refreshes..ill only have the refresh on the view side of things... because i dont want to interupt my self from doing anything...

if you need better explanation i will use camtasia to explain what im trying to do

Re: refresh data from msyql every 6 seconds

Posted: Sun Jul 19, 2009 8:15 pm
by califdon
You have described exactly what Ajax does. Asynchronous Javascript And XML. Read up on it.

Re: refresh data from msyql every 6 seconds

Posted: Sun Jul 19, 2009 8:34 pm
by dsick
yea im searching google and found a few javascript and ajax methods

sory