The code looks like this now:
Code: Select all
<script>
var tminus = 15; /// <- need to change this value so it gets the user limits value
function countdown(){
if (tminus >= 0.1){
tminus = tminus - 0.1;
tminus = Math.round(tminus*100)/100
if (!(Math.round(tminus*100) % 100)){
tminus = tminus + ".0";
}
}else {
tminus = "Continue";
}
if (tminus != "Continue"){
document.countdown_form.countdown.disabled = true;
}else{
document.countdown_form.countdown.disabled = false;
}
document.getElementById("countdown").value=tminus;
setTimeout("countdown();", 100);
}
</script>
Can anyone help?
Thanks!