title: Two forms one submit - Submit, delay, submit
body: <p>I am trying to submit two forms at once (one goes to db and the other goes to fpdf to make labels). I use jquery to copy the variables from the first form to hidden inputs on the second form. I have seen this question asked a couple times on here but none of the answers have helped. I use the 'fake' ajax method - ie: I set the form target to a hidden iframe on the same page. So I want to submit one form, then use a delay then submit the second form (because it's not working without the delay!)</p>
  
  <p>So how do I add a delay to this code:</p>
  
  <pre><code>    $('#insert').submit(function() {
      //Delay here please, or is it timeout I need?
      $('#print').submit();
      });
  
  &lt;form id="insert" action="insert.php" target="hiddeniframe"&gt;
  // a bunch of inputs
  &lt;input type="submit" value="submit"&gt;
  &lt;/form&gt;
  
  &lt;form id="print" action="pdf.php" target="hiddeniframe"&gt;
  // a bunch of inputs
  &lt;/form&gt;
  </code></pre>