Refresh parent window from child window using javascript

I tried code

window.close();
if (window.opener && !window.opener.closed) {
      window.opener.location.reload();
 } 

Its working..


window.location.reload(); reloads the parent window.


try something like this:

function closeAndRefresh(){
  opener.location.reload(); // or opener.location.href = opener.location.href;
  window.close(); // or self.close();
}

you could try this in you child window:

function refreshParent() {
  window.opener.location.href = window.opener.location.href;

  if (window.opener.progressWindow)

 {
    window.opener.progressWindow.close()
  }
  window.close();
}