How can I revers this.
Right now it disables the submit button after x amount of seconds, how can i make the submit button disabled now, and after x amount of seconds, it enables it ?
[code=php]
<body>
<script type=”text/javascript”>
seconds = 30; // number of seconds to wait
id = ‘submit’;
onload = function() {
timestamp = new Date();
time = timestamp.getTime();
}
function countdown() {
c_timestamp = new Date();
c_time = c_timestamp.getTime();
if (Math.floor((c_time – time)/1000) == seconds) {
document.getElementById(id).disabled = true;
clearInterval(timer);
}
}
timer = setInterval(“countdown()”, 1000);
</script>
</head>
<body>
<div id=”countdown”></div>
<script> startInterval();
</script>
<form action=””>
<p><input type=”submit” name=”submit” id=”submit” value=”submit” /></p>
</form>
</body>