Glenskie Posted April 3, 2014 Share Posted April 3, 2014 Here is a script i wrote so i could refresh a div with content every 5 seconds but for some reason it doesnt work ... i wanted it to load it with the page then start the refresh i didnt want it to have to wait for the refresh to show up. <script type="text/javascript"> function page_load(){ $('#contentforads').load('<?php print $actual_link ?>/ads.php').fadeIn("slow"); } function refresh(){ page_load() var auto_refresh = setInterval(page_load(),5000); } </script> Link to comment https://forums.phpfreaks.com/topic/287499-auto-refresh-not-working/ Share on other sites More sharing options...
jazzman1 Posted April 3, 2014 Share Posted April 3, 2014 Have you checked what your debugger says? Link to comment https://forums.phpfreaks.com/topic/287499-auto-refresh-not-working/#findComment-1474863 Share on other sites More sharing options...
denno020 Posted April 4, 2014 Share Posted April 4, 2014 Have you called your refresh function? Link to comment https://forums.phpfreaks.com/topic/287499-auto-refresh-not-working/#findComment-1474927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.