title: javascript confirm(cancel) still submits form when using return false?
body: <p>i am using the following code:</p>
  
  <pre><code>        &lt;form method='POST' action='post.php' style='margin-bottom:0px;'&gt;
          &lt;input type='image' name='close_x' src='imgs/button.png' onclick='confirmClose()'&gt;
          &lt;/form&gt;
  
         function confirmClose() {
              if (confirm('Are you sure you wish to close?')) {
                  return true;
              } else {
                  return false;
              }
          }
  </code></pre>
  
  <p>however, when you click cancel in the confirm box, it still submits the form.</p>
  
  <p>Surely the return false should stop this from happening?</p>
  
  <p>Any idea why?</p>
  
  <p>Thanks.</p>