# Close Browser window

**URL:** <https://forum.kirupa.com/t/close-browser-window/6960>\
**Category:** flash\
**Created:** [October 21, 2002, 12:49am UTC](https://forum.kirupa.com/t/close-browser-window/6960 "2002-10-21T00:49:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deb](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@Deb](https://forum.kirupa.com/u/Deb)\
**Post date:** [October 21, 2002, 12:49am UTC](https://forum.kirupa.com/t/close-browser-window/6960/1 "2002-10-21T00:49:55Z")

</div>

I utilized the special effect Launch a Centered Pop-Up Window for Flash MX. I want to go one step further that if there is a button in the pop-up window when you click on the button it closes the browser window or if another pop-up window is launched the previous windows closes.

[Spirit beanies](http://spillysoundstudios.com/spiritbeanies/sat.html) click on Samples then Styles choose any cap & you will see the Centered Pop-Up Window. Then if you click on the cap it doesn’t close. Can’t seem to find the right code to do that piece of it.

Any help would be appreciated.

Thanks

Deb

---

<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:** [October 21, 2002, 3:41am UTC](https://forum.kirupa.com/t/close-browser-window/6960/2 "2002-10-21T03:41:52Z")

</div>

in Flash…

```auto
on (release) {
getURL("javascript:close()");
}

```

in HTML

```php
<a href="javascript:close();">CLOSE WINDOW</a>

```

Remove the spaces between java and script as this forum automatically puts it there and it should not be there.

---

<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:** [October 23, 2002, 11:35pm UTC](https://forum.kirupa.com/t/close-browser-window/6960/3 "2002-10-23T23:35:48Z")

</div>

Thanks for the help.

---

<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:** [October 24, 2002, 1:58am UTC](https://forum.kirupa.com/t/close-browser-window/6960/4 "2002-10-24T01:58:59Z")

</div>

Glad I could help 🙂
