title: how to turn off reload of page after sending ajax to php and how to fix this code
body: <p>How to turn off reload of page after sending AJAX to PHP? The page reloads every time when I press submit. Is it possible to send some picture without form? </p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function (e){
          $("#uploadForm").on('submit', (function(e){
              e.preventDefault();
              $.ajax({
                  url: "/class/pdo/add_new_field.php",
                  type: "POST",
                  data:  new FormData(this),
                  contentType: false,
                  cache: false,
                  processData:false,
                  success: function(data){
                      $("#targetLayer").html(data);
                  },
                  error: function(){}             
              });
          }));
  
          $('#uploadForm').submit(function () {
              return false;
          });
      });
  &lt;/script&gt;
  
  &lt;form id="uploadForm" method="POST"&gt;
      &lt;div style="margin-left: 75px;"&gt;
          &lt;div class="save_divs"&gt;picture&lt;input type="file"&gt;&lt;/div&gt;
          &lt;div class="save_divs"&gt;name:&lt;/div&gt;
          &lt;div class="save_divs"&gt;date&lt;/div&gt;
          &lt;div class="save_divs"&gt;short_info&lt;/div&gt;
          &lt;div class="save_divs"&gt;long info&lt;input type="submit"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Do i need slash (<code>/</code>) in <code>$.ajax</code> url?</p>