I’m using jquery_countdown (http://keith-wood.name/countdown.html) to set a 60-minute timer. I know that I can run a callback function on time expiration, but is there a way to automatically submit the form?
I tried the following, but it failed to submit (although, there were no errors in the firebug console):
<div class="countdown"></div>
<form id="formsamp" action="#">
<textarea name="bft"></textarea>
<input type="submit" name="op" value="Submit" />
</form>
jquery_countdown_add
(
".countdown",
array
(
"until" => 10,
"onExpiry" => "finished"
)
);
function finished() {
$('#formsamp').submit(function(){return true;});
}
Try the following:
or