title: Avoid form action call to php file from loading new page
body: <p>I have a form that's calling a Post a .php file, which i though was the basis of ajax pushing (as opposed to retrieving data with ajax). Unfortunately, my browser will always load my called .php file instead of staying on the page containing the form. I' thinking there's a specific line of code I'm forgetting somewhere. What should I be looking for?</p>
  
  <pre><code>&lt;form id="form-upload" enctype="multipart/form-data" action="_scripts/ajax/cropImage.php" method="post" onsubmit="return checkCoords();" style="min-height:450px; position:relative;"&gt;
                      &lt;input type="hidden" id="x" name="x" /&gt;
                          &lt;input type="hidden" id="y" name="y" /&gt;
                          &lt;input type="hidden" id="w" name="w" /&gt;
                          &lt;input type="hidden" id="h" name="h" /&gt;
                      &lt;input type="hidden" id="ht" name="ht" /&gt;
                      &lt;input type="hidden" id="wt" name="wt" /&gt;
                      &lt;div style="position:absolute"&gt;
                      &lt;h2&gt;Upload a picture&lt;/h2&gt;
                      &lt;input id="input-upload" name="input-upload" type='file' onchange="readURL(this);" /&gt;&lt;br/&gt;
                      &lt;img id="upload-preview" src="" alt="" /&gt;
                      &lt;div style="position:absolute; bottom:0;"&gt;
                          &lt;input type="submit" value="Upload" /&gt;
                          &lt;input type="button" value="Cancel" onclick="$('#fancybox-close').trigger('click');"/&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;img id="spinner" style="position:absolute; background-color:transparent; left:49%; top:50%;" src="_images/uploads/ajax-loader.gif" height="32" width="32"/&gt;
                  &lt;/form&gt;
  </code></pre>