# Creating a button that closes the window

**URL:** <https://forum.kirupa.com/t/creating-a-button-that-closes-the-window/117151>\
**Category:** Uncategorized\
**Created:** [July 24, 2004, 10:30pm UTC](https://forum.kirupa.com/t/creating-a-button-that-closes-the-window/117151 "2004-07-24T22:30:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbadmilkman](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bigbadmilkman](https://forum.kirupa.com/u/bigbadmilkman)\
**Post date:** [July 24, 2004, 10:30pm UTC](https://forum.kirupa.com/t/creating-a-button-that-closes-the-window/117151/1 "2004-07-24T22:30:20Z")

</div>

I am trying to create a button that when clicked on closes the browswer window, does anyone know how this is done?

Any help would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![McGiver](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@McGiver](https://forum.kirupa.com/u/McGiver)\
**Post date:** [July 25, 2004, 12:24am UTC](https://forum.kirupa.com/t/creating-a-button-that-closes-the-window/117151/2 "2004-07-25T00:24:25Z")

</div>

you can’t just close a browser window except you opened it as a popup.

concerning the  
opening a popup and closing it again:  
google for “javascript+close”, I’m sure you will find billions of links there 😉
