wood burning stoves 2.0*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
Author

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


Regards
Bhagavan
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can ONLY close windows YOU create with window.open()

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

Eric
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

As an aside, closing a window in a function named openwin() is counter-intuitive.
 
 
subject: window.close not working in mozilla