# Javascript Popup, close and redirect

**URL:** <https://forum.kirupa.com/t/javascript-popup-close-and-redirect/231934>\
**Category:** web dev\
**Created:** [July 9, 2007, 6:34pm UTC](https://forum.kirupa.com/t/javascript-popup-close-and-redirect/231934 "2007-07-09T18:34:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takaya213](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/takaya213/32/3724_2.png) [@Takaya213](https://forum.kirupa.com/u/Takaya213)\
**Post date:** [July 9, 2007, 6:34pm UTC](https://forum.kirupa.com/t/javascript-popup-close-and-redirect/231934/1 "2007-07-09T18:34:38Z")

</div>

Hi all

I have a popup that opens with the main menu of the website at the top of the popup. Now I want to be able to close the popup when you click on a menu item and the page must display on the link that was clicked in the popup, (that is the main browser window, where the popup originated from).

How do I do this? I’m really lost, I tried onClick=“window.close(); window.redirect(‘index.asp’);” and of course it doesn’t work, please help urgently if you can.

Thanks,  
T’akaya213
