?
Solved

How to click a button and close the browser

Posted on 2002-03-08
5
Medium Priority
?
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 200 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

770 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