Yes, you can do it by using LIve Connect technology.

In order to do this , you need some netscape.javascript.* classes. They are
available in netscape browser directories, I think java40.jar;

By using these classes you can invoke javascript functions from Java.
In order to communicate from javascript to java, you do not need these
classes but a tag MAYSCRPIT must be included in your applet tag.

for some live connect examples, check devedge.netscape.com



Never use System.exit(0) in an applet.

----- Original Message -----
From: Simonin, Bradley <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 13, 1999 4:47 PM
Subject: Applet to Servlet communication and then execute JavaScript.


> Hello all,
>
> I have a Java Applet that communicates bi-directionally with a Java
Servlet.
> When the user of the Applet clicks the Applet Quit button, I would like to
> execute some JavaScript to move the user back several HTML pages in the
> browser history using JavaScript.  Example: window.history.back(1).  Is
> there anyway I can get a Java Applet to execute this JavaScript after the
> following Applet Frame Code:
>
> setVisible(false);
> dispose();
> System.exit(0);
>
> Any suggestions?  Thanks in advance,
>
> Brad Simonin
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to