Solved

jquery countdown - autosubmit form upon expiration?

Posted on 2012-04-09
1
1,648 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 500 total points
ID: 37825346
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I implement a "Select All" with this configuration...? 6 42
Scroll 5 news at a time. 4 29
Hide cell in a table 2 15
html Uncheck Checkbox 2 13
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

831 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