please help, theres 2 things i want to asking about:
- with that script, the count down just show an number, iwant the countdown shown as time format --:--:--
i cant auto submit after the countdown finish, and the count down wont stop after zero.
<script> function timeOut(){ alert("timeout"); document.getElementById('myFormId').submit(); } (function () { var timeLeft = <?php echo ($data_test['TIME'] * 60) - $tb ?>, cinterval; var timeDec = function (){ timeLeft--; document.getElementById('timer').innerHTML = timeLeft; if(timeLeft === 0){ timeOut(); clearInterval(cinterval); } }; cinterval = setInterval(timeDec, 1000); })(); </script>