title: can't ajax post a from with firefox
body: <p>I want to post a from using jQuery ajax without page reloading, it works fine in Chrome but not works in Firefox 6.0. Below is my code</p>
  
  <pre><code> &lt;html&gt;
      &lt;head&gt;
      &lt;script type="text/javascript"&gt;
        function save()
        {
          $('#myForm').submit(function(event){
            event.preventDefault();
            $.ajax({
                     type:'POST',
                     url:'save.php',
                     data:$('#myForm').serialize(),
                     success:function(data)
                     {
                          alert('form submitted');
                     },
                     error:function()
                     {
                         alert('unable to submit');
                     }   
                 });
            });
        }
      &lt;/script&gt;
      &lt;/head&gt; 
         &lt;body&gt;
               &lt;form id="myForm" action=''&gt;
                  &lt;input type="text" name="firstName"&gt;
                  &lt;input type="text" name="lastName"&gt;
                  &lt;input type="submit" id="submitForm" onclick="save(myForm);"&gt;
               &lt;/form&gt;
         &lt;body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any help would be much appreciated.</p>