title: how to disable submit button with jquery
body: <p>I have a simple form to check the value of post code entered by the user against a variable,</p>
  
  <p>I'm trying to disable the submit button and do the check and give alert message, I can't figure out what I'm doing wrong, any help would be appreciated.</p>
  
  <pre><code>  &lt;form id="post_code"&gt;
          &lt;input name="textfield" type="text" id="postcode" size="14" maxlength="8" /&gt;
          &lt;input type="image" id="submit_postcode" src="images/B_go.png" alt="Submit Postcode" width="59" height="24" border="0" /&gt;
    &lt;/form&gt;
  
  
  $(function() {
  
     $('form#post_code').submit(function() {
  
      var entered_post_code = $('form#post_code input#postcode').val();
      var post_code = "CV";
      if (entered_post_code == post_code) {
          alert("post code is ok");
          return true;
      }else {
          alert("post code is not ok");
          return true;
      }
      return false;   
  });
  </code></pre>
  
  <p>});</p>