title: Refresh page after delete photo
body: <p>Hi I have function in javascript where I delete photos from database and from server. It work fine, I delete photo but this photo is still in my browser. I have question. How can I refresh only on javascript side?</p>
  
  <pre><code> container.addEventListener("click", function(e){
                  if(e.target.tagName == 'BUTTON'){
                       var id = e.target.dataset.type;
                     var r = confirm("Are You sure to delete?");
  if (r == true) {
      $.ajax({
          type: 'POST',
          url: 'index.php?r=gallery/deletep&amp;name='+id,
          dataType: 'html'
      });
  } 
                  }
      });
  </code></pre>
  
  <p>Now I treid to add </p>
  
  <blockquote>
    <p>location.reload();</p>
  </blockquote>
  
  <p>after ajax but I don't want to refresh all page. How Can i delete dynamically from browser?</p>