title: Automatically submitting a HTML form after scanning a barcode
body: <p>I am trying to automatically submit a form after scanning a barcode. The number I scan is always 16 digits long. </p>
  
  <pre><code>&lt;form id="Form" action="action.php" method="post"&gt;
    &lt;input id="here" maxlength="16" placeholder="scan..." type="text" tabindex="1" required autofocus&gt;
    &lt;input id="subHere" type="submit"&gt;
  &lt;/form&gt;
  
  &lt;script&gt;
    $('#here').keyup(function(){
      if(this.value.length ==16){
      $('#subHere').click();
      }
    });
  &lt;/script&gt;​
  </code></pre>
  
  <p>The restriction of entering 16 digits is working but my form is not automatically submitting after entering the 16 digits.</p>
  
  <p>I also want to clear the form after submitting, so I can scan the next barcode. Do you have any suggestions?</p>