View Single Post
Old 09-07-2010, 11:31 AM   #2 (permalink)
EyeDentify
The Acquainted
 
EyeDentify's Avatar
 
Join Date: Nov 2007
Location: Sweden
Posts: 106
Thanks: 13
EyeDentify is on a distinguished road
Default

Quote:
Originally Posted by KingOfTheSouth View Post
I have not worked a lot with javascript in the past. What I am trying to is make it count down live with javascript and php. The php statement is
PHP Code:
<?=countup($site[cron5min]+300)?>
this is what I have up now but you have to refresh the page to see that the time has gone down. I want the javascript to do it live and automatically refresh when it gets to zero because it will restart the countdown. Can anyone help me out?
I will give you a push in the right direction :)

Have a look at these JavaScript object methods:

http://www.w3schools.com/jsref/met_win_setinterval.asp

And this one:

http://www.w3schools.com/jsref/met_loc_reload.asp

You should be able to figure it out now :)

Or are you using AJAX with a framework to call a PHP file somewhere and in that is the code that renders the "counter" and when that counter reaches zero it should reload ?
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
EyeDentify is offline  
Reply With Quote