Solved

How to click a button and close the browser

Posted on 2002-03-08
5
217 Views
Last Modified: 2010-03-31
Hi, there,

I'm using Java Applet to devlope a project.  Is there any way to click a button on the applet (e.g. "Exit" button), and cause the whole browser to be closed?

daisy
0
Comment
Question by:DaisyWang
5 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 6851405
try:

getAppletContext().showDocument(new URL "javascript:self.close()"));
0
 

Author Comment

by:DaisyWang
ID: 6851425
bobbit31,

it doesn't work.

daisy
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 50 total points
ID: 6851461
sorry that was for netscape only (i still couldn't get it to work)

see this page: http://www.rgagnon.com/javadetails/java-0172.html

it has all the details on calling js from applet.
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7902165
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by: bobbit31
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7962793
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now