Check my logic
Posted: Mon Feb 16, 2004 7:25 pm
I am trying to build a page that will refresh only when needed not manually, or on a timeout. So I have this idea to do something like this:
<body onLoad="setTimeout("<?php refresh_function(); ?>" , 5000);">
Then writing a php function to scan the database every few minutes and if the database has been updated then refresh the page but if not just continue until the next refresh dictated by the javascript setTimeout function.
Can this work??
<body onLoad="setTimeout("<?php refresh_function(); ?>" , 5000);">
Then writing a php function to scan the database every few minutes and if the database has been updated then refresh the page but if not just continue until the next refresh dictated by the javascript setTimeout function.
Can this work??