aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes javascript:window.close() not working in firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "javascript:window.close() not working in firefox" Watch "javascript:window.close() not working in firefox" New topic
Author

javascript:window.close() not working in firefox

kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
javascript:window.close() not working in firefox
but works in IE/Win.
please any suggestions?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
This on a pop up window?

Eric
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
Thanks for prompt reply.
No, not on popup window. on main page. I actually works if written directly in browser url, but not if called from a script on the page. However works either way from explorer!

What i'm trying to do is place a link on a logout page for closing the browser.
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
I kinda figured it out.

Turns out Mozilla will only use a window.close() script to close a page that was previously opened by a script, such as a popup window!
(amazing what one can learn by simply Googling a question!!!)

Anyway if someone knows a work around to this, I would be greatful!
Pavan Keely
Ranch Hand

Joined: Jun 30, 2006
Posts: 62
Kwame,

I put a workaround in this short article.

http://keelypavan.blogspot.com/2006/07/closing-tabwindow-in-mozilla-using.html


Pavan Keely


Pavan Keely<br /><a href="http://keelypavan.blogspot.com" target="_blank" rel="nofollow">http://keelypavan.blogspot.com</a>
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
Nice one Pavan!
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javascript:window.close() not working in firefox