title: Why is my form doing other things than what I told it to do on submit?
body: <p>I've ripped some code from a website and I want to change the action of one of their <code>input</code> elements (since it was causing a Server Error). So what I did is change the <code>action</code> to <code>""</code> and add <code>onsubmit="myFunction()</code>". What I have is like </p>
  
  <pre><code>&lt;form method="get" name="formname" action="" onsubmit="myFunction()"&gt; .... &lt;/form&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>function myFunction()
  {
      alert("good, my function was called");   
  }
  </code></pre>
  
  <p>I've confirmed that when I click enter in the <code>input</code>, the <code>alert</code> function is called. However, the Sever Error that the form was causing is still happening <strong><em>after</em></strong> I click ok on the alert.</p>
  
  <p>Any ideas on why this might be? Basically, I'm trying to make <code>myFunction</code> be the only thing that happens when the <code>form</code> is submitted.</p>