title: Submit form that is located on different page
body: <p>I'm having some troubles with the system I work on. I want to submit a form that is located on page A after submission but also after a user does something on page B or enters it or leaves it. </p>
  
  <p>I want to make it so that after the user enters or leaves page B the form that is located on page A will be submitted without the user doing anything.</p>
  
  <p>So far I've tried to submit the form from the page B with plain JavaScript and jQuery...</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  document.getElementById("formID").submit();
  &lt;/script&gt;
  </code></pre>
  
  <p>... as well as doing the same with jQuery...</p>
  
  <pre><code>jQuery( document ).ready( function() {
      jQuery( "#formID" ).submit();
      });
  </code></pre>
  
  <p>I even tried to add an <code>onClick</code> function to the form and this function I've placed in page B but it didn't work.</p>
  
  <p>I'm open for ideas or possible fixes. </p>