Link to home
Start Free TrialLog in
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.

ASKER CERTIFIED SOLUTION
Avatar of Kobold
Kobold

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kobold
Kobold

Also, your applet need this tag:

<APPLET MAYSCRIPT  ARCHIVE=....

Avatar of jsimoni

ASKER

Answer accepted