Avatar of jsimoni
jsimoni

asked on 

Closing browser window with Javascript

I have seen some sample code that uses the following line to close the browser window of an applet:

this.getAppletContext().showDocument(new URL("javascript:window.close();"), "_top");

i keep getting the error message:

unknown protocol: javascript

anyone have any suggestions?  ravindra76,  i have seen you suggest this code in the past.

Java

Avatar of undefined
Last Comment
jsimoni
ASKER CERTIFIED SOLUTION
Avatar of Kobold
Kobold

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Kobold
Kobold

Also, your applet need this tag:

<APPLET MAYSCRIPT  ARCHIVE=....

Avatar of jsimoni
jsimoni

ASKER

Answer accepted
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo