Question: I opened a popup window by window.open in JavaScript, I want to refresh parent page when I close this popup window.(onclose event?) how can I do that?

```
window.open("foo.html","windowName", "width=200,height=200,scrollbars=no");

```

Answer: 
In my case I opened a pop up window on click on linkbutton in parent page.
To refresh parent on closing child using 

```
window.opener.location.reload();

```

in child window caused re open the child window (Might be because of View State I guess. Correct me If I m wrong).
So I decided not to reload page in parent and load the the page again assigning same url to it.

To avoid popup opening again after closing pop up window this might help,

```
window.onunload = function(){
    window.opener.location = window.opener.location;};

```
**Try this**

```
        self.opener.location.reload(); 

```

> 
> Open the parent of a current window and reload the location.
> 
> 
>