Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Client Scripting
Expertise: Beginner
Oct 22, 1999



Application Security Testing: An Integral Part of DevOps

Closing the User's Browser Window

I want to close the window that opened a new window using window.opener.close().The problem is when this code is executed, some confirmation message pops up. Is there any way to stop this message from appearing in my window?

This is by design and you can't change it. The idea being that closing the user's browser window is impolite and they should have the opportunity to intervene. One additional thing to note is that the window.close() behavior also varies from browser to browser and between browser versions. This means that while one kind of browser will display a confirmation dialog to the user (like the one you mention), others may not.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date