title: Force form field value on page load & submit
body: <p>How could I force a specific value within a form field on page load; and have that value 'Submit'  with JavaScript or jQuery?</p>
  
  <p>I tried the below; but no cigar.</p>
  
  <pre><code>&lt;script&gt;
  window.onload = function(){
  document.forms['coolform'].submit()
  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Mark-Up.</p>
  
  <pre><code>    &lt;form id="search" name="coolform" class="navbar-form form-search" action="#"&gt;                    
          &lt;div class="input-append"&gt;
              &lt;input id="query" type="text" class="search-query" value="Bars" &gt;
              &lt;button type="submit" class="btn"&gt;&lt;i class="icon-search"&gt;&lt;/i&gt;&lt;/button&gt;
  
          &lt;/div&gt;     
  </code></pre>