# Javascript opener

**URL:** <https://forum.kirupa.com/t/javascript-opener/204128>\
**Category:** Uncategorized\
**Created:** [October 17, 2006, 10:58am UTC](https://forum.kirupa.com/t/javascript-opener/204128 "2006-10-17T10:58:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![J11](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@J11](https://forum.kirupa.com/u/J11)\
**Post date:** [October 17, 2006, 10:58am UTC](https://forum.kirupa.com/t/javascript-opener/204128/1 "2006-10-17T10:58:48Z")

</div>

I am using this code in a pop up, so it opens goto.html in the parent window

```auto
<a href="goto.html" onclick="javascript:window.close(''); opener.top.open("#");" >click</a>

```

but window.close() is not working.  
what can i do to close the pop window and open the page at the same time

Pls help
