title: Simple .ajax fail
body: <p>A simple fiddle where .ajax fails:</p>
  
  <pre><code>&lt;form action="welcome_post.php" method="post" id="f"&gt;
  Name: &lt;input type="text" name="name"&gt;&lt;br&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  &lt;script&gt;
    $(document).ready(function(){
        $("#f").submit(function(event) {
            event.preventDefault();
            $.post("/tests/welcome_post.php",function(data){
                alert(data)
            }); 
        }); 
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>and welcome_post.php response</p>
  
  <pre><code>&lt;?php echo $_POST["name"]; ?&gt;
  </code></pre>
  
  <p>If I remove event.preventDefault() the code loads a new php page and works, otherwise the $_POST variable is not set and alerts with undefined index error. How to make it set for .post to work?</p>