Solved

jquery countdown - autosubmit form upon expiration?

Posted on 2012-04-09
1
1,708 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37825346
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
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…

636 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