title: Javascript autosubmit form when specific string detected in textarea
body: <p>Hopefully, a bit of a newbie JS question. (I searched &amp; found some sort-of similar ones, but not quite this situation...) Ok, I have a simple form like this:</p>
  
  <pre><code>&lt;form method="POST" action="foo.php"&gt;
  &lt;textarea name="inputBox123"&gt;&lt;/textarea&gt;
  &lt;input type="submit" value="Go" name="B1" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Of course, the form has a normal submit button. But, in addition to that, I would like to have a code word like "okaygo" (or anything such string) such that, if the textarea contains this word (either if it is typed, pasted, etc.), then the form would auto-submit, just as though the button were pressed.</p>
  
  <p>So, I figure I need some way to continually monitor the content of the text-area, and evaluate it against whether that string is present -- and if so submit. Can anyone show me how to do that, or at least point me in the right direction?</p>
  
  <p>(Just for anyone wanting to know why... I work w/ some people who use scanners to enter form data. Usually they scan data into the form and click the submit button. But, they also said they could save time if they didn't always have to put the scanner down and click the submit button. So, I told them maybe I could come up w/ a barcode on the screen coded for some specific string like 12345678 or okaygonow, or whatever. So, the idea is, they scan their stuff, scan the barcode, the string appears in the form, it's detected by Javascript, and then the form submits &amp; they don't have to even touch the keyboard / mouse. Anyway, that's the idea.)</p>