title: ajax call to php function without changing url
body: <p>I am working with Symfony2 and I am using Dropzone.js with the bundle OneUploader to upload several images at a time.
  Dropzone.js has the option of deleting an image that has been selected to upload, but the problem is that when I click on 'Remove' the image is only removed on the client side, not on the server. So what I need is to make an ajax call in mi dropzone.js to a function in my php that deletes the file from the server. The question is: how can I make that call in order that the url is not changed? I am using this one but it is not working, because the url is changing:</p>
  
  <pre><code>$.ajax({
            url: 'delete.php',
            method:'POST',
            data: {name: file.name}
          });
  </code></pre>
  
  <p>Thanks in advance.</p>