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 not working in mozilla Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window.close not working in mozilla" Watch "window.close not working in mozilla" New topic

window.close not working in mozilla

rajanikanth bhagavan kanth
Ranch Hand

Joined: May 20, 2008
Posts: 78
window.close is not working in mozilla , i have tried self.close also(Mozilla 3.0.16)

just i called one javascript function in onclick

in that function i wrote like window.close();

can any one please help me.

here is the sample code

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can ONLY close windows YOU create with

If window.close() works for you without a popup window in IE, you must be using an old version of IE.

David Newton

Joined: Sep 29, 2008
Posts: 12617

As an aside, closing a window in a function named openwin() is counter-intuitive.
I agree. Here's the link:
subject: window.close not working in mozilla
It's not a secret anymore!