Javascript - return keyword in Form vs Function
<p>How does a return work in a Form vs a function?</p>

<p>I know you can <code>return false</code> in a function and it will stop the flow of the program,  great if you want to cancel a postback.  Why would I have a return in a Form as well?</p>

<p>Author snippet from beginning javascript book by Christian Heilmann:</p>

<pre><code>&lt;form action="whatever" method="post" onsubmit="return checkSearch();"&gt;

function checkSearch()
{
  alert ('foo');
  return false;
}
</code></pre>
