File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Problem closing browser window on Firefox 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 "Problem closing browser window on Firefox" Watch "Problem closing browser window on Firefox" New topic
Author

Problem closing browser window on Firefox

Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Hi my friends,

I am using this code snippet to close browser window:



The code is working perfectly on IE.
On Firefox, if the page contains that script is on local machine, it is working perfectly as well.
However, if the page comes from a remote server, Firefox shows an error message:

Error: A script from "http://localhost:9898" was denied UniversalBrowserWrite privileges.


Does anyone have a workaround?

Advanced java topics
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

You cannot close any window that you did not open with window.open().


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Minh Nam
Ranch Hand

Joined: Sep 10, 2011
Posts: 57
Bear Bibeault wrote:You cannot close any window that you did not open with window.open().


OK. Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem closing browser window on Firefox
 
Similar Threads
Firefox 3.5 Browser window close using javascript
Opening webpage from Applet
Need help getting applet to work in IE7
Running Signed Applet: Some Success, Some Hurdles
Tomcat 5.5 Login Problem in Firefox