# Creating a button that closes the window

**URL:** <https://forum.kirupa.com/t/creating-a-button-that-closes-the-window/58681>\
**Category:** Uncategorized\
**Created:** [July 24, 2004, 10:30pm UTC](https://forum.kirupa.com/t/creating-a-button-that-closes-the-window/58681 "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/58681/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:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 12:24am UTC](https://forum.kirupa.com/t/creating-a-button-that-closes-the-window/58681/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 😉
