Solved

How to click a button and close the browser

Posted on 2002-03-08
5
198 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

705 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

17 Experts available now in Live!

Get 1:1 Help Now