title: JavaScript - Form OnSubmit works but Action doesn't
body: <p>On my <code>FORM</code>, for some reason, I can get my form input variable via <code>onsubmit</code> but not using <code>action</code>.</p>
  
  <p>This works:</p>
  
  <pre><code>&lt;form onsubmit="javascript:myFunc(this.city.value);"&gt;
      &lt;p&gt;&lt;input type="text" id="city-field" name="city" onfocus="this.select();" /&gt; &lt;input type="submit" value="Find" /&gt;&lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This doesn't work (<code>this.city.value</code> is found to be null)</p>
  
  <pre><code>&lt;form action="javascript:myFunc(this.city.value);"&gt;
      &lt;p&gt;&lt;input type="text" id="city-field" name="city" onfocus="this.select();" /&gt; &lt;input type="submit" value="Find" /&gt;&lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Why is it that <code>onsubmit</code> can get the <code>this.city.value</code> but the <code>action</code> event cannot?</p>