title: jquery delete file and refesh a div
body: <p>hi i am new in jquery i want to delete a file in server and do refresh in div but some error happen</p>
  
  <p>image folder is ../img/tanda_tangan/tanda_tangan.png</p>
  
  <p>ajax</p>
  
  <pre><code>$(document).ready(function(){
      $('#hapus').click(function(){
  
          var imgElement_src = $('../img/tanda_tangan/tanda_tangan.png');
  
          // AJAX request
          $.ajax({
              url: 'removefile.php',
              type: 'post',
              data: {path: imgElement_src},
              success: function(response) {             
                  // Changing image source when remove
                  if(response == 1){
                      $("#tanda").load(location.href + "#tanda");
                  }
              }
          });
      });
  });
  </code></pre>
  
  <p>and a button</p>
  
  <pre><code>&lt;button type="button" id="hapus" class="hapus" &gt;
      &lt;span class="glyphicon glyphicon-remove"&gt;&lt;/span&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>removefile.php</p>
  
  <pre><code>&lt;?php 
      $path = $_POST['path'];
  
      $return_text = 0;
  
      // Check file exist or not
      if( file_exists($path) ){
  
          // Remove file 
          //   unlink($path);
  
          // Set status
          $return_text = 1;
      }else{
  
          // Set status
          $return_text = 0;
      }
  
      echo $return_text;
  </code></pre>
  
  <p>and a div</p>
  
  <pre><code>&lt;div id="tanda"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>what was wrong? i couldnot delete file 
  in ../img/tanda_tangan/tanda_tangan.php</p>