Well I'll need some more clarification, what is your intention with refreshing the page? It is possible to make the page change location (which could be to itself), however without something else on the page this is kind of pointless.
You can achieve this kind of behavior by doing this in the Javascript .get function.
Code:
if( data == "Database Backup in T-Minus 0 minutes 0 seconds!" )
location.reload();
Obviously there's ways to spruce this up in PHP. Such as making it display "Starting Backup!" when the minutes and seconds variables hit 0. Your coding level should allow you to do this without my assistance.
__________________ Unless otherwise stated, any code posted is most likely untested and may contain syntax errors.
My posts, comments, code, and suggestions reflect only my personal views.
Web Portfolio and Code Snippets: http://shanechism.com
that is what im trying to achieve, but when it hits 00:00 i would like the page to refresh itself, so that it is directed back to the same page but without sending any of the post data that was selected in order to start the timer, if that makes any sense
If you still want to do the refresh, see my previous post for the code.
__________________ Unless otherwise stated, any code posted is most likely untested and may contain syntax errors.
My posts, comments, code, and suggestions reflect only my personal views.
Web Portfolio and Code Snippets: http://shanechism.com
in a way yes, sorry if i am confusing you, the only other way i can think of itt being done is if the box can be set to disappear from the page without a refresh, as it will be in a box like i have displayed?
Let's say your checkbox has an ID of "backupCheckbox".
Then in the $(document).ready( function() { ... } block use something like this:
Code:
$("#backupCheckbox").hide();
__________________ Unless otherwise stated, any code posted is most likely untested and may contain syntax errors.
My posts, comments, code, and suggestions reflect only my personal views.
Web Portfolio and Code Snippets: http://shanechism.com
If you combine it with what I already suggested. I really don't want to do too much in the way of coding for you here. The point is that you need to learn, otherwise if this breaks down you'll have no way to fix it or even modify it.
In your jQuery AJAX you put a condition:
Code:
var refreshCountdown = setInterval( function() {
$.get( "/ajaxTimer.php", {}, function( data ){
if( data == "Database Backup in T-Minus 0 minutes 0 seconds!" )
$("#backupCheckbox").hide();
else
$("#countdownBlock").html( data );
});
}, 1000 );
__________________ Unless otherwise stated, any code posted is most likely untested and may contain syntax errors.
My posts, comments, code, and suggestions reflect only my personal views.
Web Portfolio and Code Snippets: http://shanechism.com