aspose file tools*
The moose likes Applets and the fly likes Closing browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Closing browser" Watch "Closing browser" New topic
Author

Closing browser

Mohammad Farhat
Ranch Hand

Joined: Nov 17, 2005
Posts: 51
Hey Guys,
is there a way that i close all open browsers on the client side using an applet code?
also is there a way to restart one browser after that?
the reason behind this is that from my signed applet, i am changing the max memory heap size for the jvm, and i need to close all browsers for the change to take effect, and a nice feature also is to put the user back into the log in page...
Any ideas?
Thanks,
Mohammad
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Try using the netscape.javascript package


// Mathias


Ps. win.evalutate is not right. Could not post the right tag here


SCJP1.4
Mohammad Farhat
Ranch Hand

Joined: Nov 17, 2005
Posts: 51
Mathias,
thanks for the reply...but this helps in closing simply the current window in which the applet is opened.
What i actually need is to close all instances of the browser currently opened, since this is the only way through which the jvm would be restarted...
Any other thoughts ?
Best,
Mohammad
Mathias Nilsson
Ranch Hand

Joined: Aug 21, 2004
Posts: 367
Ok! I don't know if you can loop thru all the browser windows. Try asking this question in the HTML, Javascript forum. If there is a reply that works, put the code in a javascript function and call the function inside the applet.

Mathias
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closing browser
 
Similar Threads
Browser closed detection
Loading an Applet Takes Time
Browser window and applet frame
With Java Plug-in, document.applets.length returns 0
What is a Session's scope?