I am trying to make a form to be posted using time. I have managed to make a count time. I would like to enter a specific time to post the from etc. 12:00.
is it possible?
<html>
<head>
</head>
<body>
<span id="remain"></span>
<form action="3.php" method="post" id="form1" name="form1">
<input type="text" name="id">
<input type="submit" name="Go" value="submit">
</form>
<script type="text/javascript">
window.onload=counter;
function counter() {
seconds = 150;
countDown();
}
function countDown(){
document.getElementById("remain").innerHTML=seconds;
setTimeout("countDown()",1000);
if(seconds == 0) {
document.form1.submit();
}else {
seconds--;
}
}
</script>
This is done with find current time and then compare current time with your set time on that you want to post form
Find Current Time
With above code you find the current time and then compare with specific time.
If both time is equal then run the function.