Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

jquery countdown - autosubmit form upon expiration?

Posted on 2012-04-09
1
Medium Priority
?
1,765 Views
Last Modified: 2012-04-09
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;}); 
    }

Open in new window

0
Comment
Question by:n00b0101
1 Comment
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 2000 total points
ID: 37825346
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question