File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes window.close() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window.close()" Watch "window.close()" New topic


Fernando Dominguez
Ranch Hand

Joined: Sep 01, 2006
Posts: 104


Hello, I'm triying to close a window that I have opened (as a popup window) using window.close() but It
doesn`t work on Internet explorer (it works on firefox)

Here is the code

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
I am surprised that it works in Firefox, you must have it set to do it.

It is a security setting to keep you from destroying a person's history, removing toolbars, etc. Leave the window alone! Plus what happens if a pop up blocker would block the pop up and also close the window.

I agree. Here's the link:
subject: window.close()
It's not a secret anymore!