Solved

jquery countdown - autosubmit form upon expiration?

Posted on 2012-04-09
1
1,628 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now