title: ajax on submit no refresh form using php
body: <p>ok so i know this ajax works, but i cant seem to understand why it's not submitting here.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function(){
      $('input[type=submit]').click(function(){
          $.ajax({
              type: "POST",
              url: "postitem.php",
              data: $("#myform").serialize(),
              beforeSend: function(){
                  $('#result').html('&lt;img src="loading.gif" /&gt;');
              },
              success: function(data){
                  $('#result').html(data);
              }
          });
      });
  });
  </code></pre>
  
  <p></p>
  
  <p>submit form </p>
  
  <pre><code>&lt;form action="" method="post" onsubmit="return false;" id="myform"&gt;
  </code></pre>
  
  <p>submit button</p>
  
  <pre><code>&lt;input type="hidden" value="Post" name="submit" /&gt; 
  &lt;button type="submit" title="Done" style="height:33px; width:50px"&gt;
      &lt;img src="../../css/images/plus_25.png" /&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>i'm pretty something is wrong with the button, but i want to keep the way the button is because alot of my other forms use this same button, thanks if you can explain to me why click this submit button does nothing.</p>