# Close browser sans confirmation

**URL:** <https://forum.kirupa.com/t/close-browser-sans-confirmation/15201>\
**Category:** Uncategorized\
**Created:** [March 11, 2003, 8:31pm UTC](https://forum.kirupa.com/t/close-browser-sans-confirmation/15201 "2003-03-11T20:31:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnonymousCaller](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@AnonymousCaller](https://forum.kirupa.com/u/AnonymousCaller)\
**Post date:** [March 11, 2003, 8:31pm UTC](https://forum.kirupa.com/t/close-browser-sans-confirmation/15201/1 "2003-03-11T20:31:40Z")

</div>

When I use the code below:

on (release){  
getURL(“java script:close();”);  
}

I get a “This Page you are viewing is trying to close. Do you want to allow it to close?” with a Yes and No buttons.

Is there another way to do it without the confirmation?

If you want to see it, click on the “Exit” on the following link:

[http://www.mdbprojects.net/salary\_assessor\_tutorial.html](http://www.mdbprojects.net/salary_assessor_tutorial.html)

Thanks,  
AC

---

<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:** [March 11, 2003, 8:41pm UTC](https://forum.kirupa.com/t/close-browser-sans-confirmation/15201/2 "2003-03-11T20:41:34Z")

</div>

try this:

java script:self.close()

without the space between java & script

Its a security measure and there was a way around it before IE Service Pack 6.1 that might work, it can be seen in action here:

[http://www.tatugirls.com/](http://www.tatugirls.com/) just click on gallery and click one of the limages…

---

<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:** [March 11, 2003, 10:31pm UTC](https://forum.kirupa.com/t/close-browser-sans-confirmation/15201/3 "2003-03-11T22:31:34Z")

</div>

The warning will not happen if the window is a pop up or is launched from the main window via \_blank target in the A HREF tag in HTML (or launched \_blank from flash as well).

As Jubba said, when closing the main browser window through a link, that message will appear. Microsoft calls this a “Security Issue” (bull), and they removed the workaround solution in their recent browsers.

---

<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:** [March 12, 2003, 12:06am UTC](https://forum.kirupa.com/t/close-browser-sans-confirmation/15201/4 "2003-03-12T00:06:29Z")

</div>

I tried adding the “\_blank” in the Window. Gives me an error with the

javascript:newWindow(‘[http://www.erieri.com/AssessorTutorials/erisa/set\_individual\_pay.html](http://www.erieri.com/AssessorTutorials/erisa/set_individual_pay.html)’)

in the address line. Any ideas?

---

<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:** [March 12, 2003, 1:39am UTC](https://forum.kirupa.com/t/close-browser-sans-confirmation/15201/5 "2003-03-12T01:39:37Z")

</div>

Well because it looks to me you are calling a javascript pop up window. If that is the case, there is no need for \_blank as it will open a new window anyway.

And notice, if you click on your link about and then click the exit in there, there is no message. But if you open a new browser window and go to that link, you get the message.

This is because this forum opens it up in a new window and therefore it works fine.

There is no way around this unless you open the window in a new window or pop up.
