This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: window.close not working in mozilla
 
Similar Threads
Closing the browser window in JSP
Executing a function before window.close
Problem in Submit() Function
JSP & JavaScript Problem
how to identify child window and close it using javascript