• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

How to click a button and close the browser

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
DaisyWang
Asked:
DaisyWang
1 Solution
 
bobbit31Commented:
try:

getAppletContext().showDocument(new URL "javascript:self.close()"));
0
 
DaisyWangAuthor Commented:
bobbit31,

it doesn't work.

daisy
0
 
bobbit31Commented:
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
 
Venci75Commented:
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
 
NetminderCommented:
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now