File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 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 » 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Closing browser