Posted By

tylerhall on 07/12/06


Tagged

form delay submit


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

luman
mary


Delayed Form Submit


 / Published in: JavaScript
 

URL: http://holdren.com

Wait a specified after clicking "submit" before actually submitting a form.

  1. function waitThenSubmit(sec) {
  2. setTimeout("document.forms[0].submit();", sec * 1000);
  3. return false;
  4. }
  5.  
  6. <form onsubmit="return waitThenSubmit(5);">
  7. </form>

Report this snippet  

You need to login to post a comment.