javascript->applet communication

4

418928

Hi everybody,

I would like to know if the way of communicating with an applet from
Javascript is standard (valid for all web browsers). I know that
JSObject (Applet->javascript) is not compatible with some browsers,
but I have not found any document indicating that the javascript-
applet could fail with some browsers.

Also, I would like to know if there is any way to detect if a certain
applet is running on a different JVM and obtain a reference to it
(using Javascript).

Thanks,
Sergio.
 
L

Laurent Bugnion [MVP]

Hi,

Hi everybody,

I would like to know if the way of communicating with an applet from
Javascript is standard (valid for all web browsers).

"all" is very large. Does it include Blazer on PalmOS, for example? :)
Probably not.

In the past when I was still playing with LiveConnect, my findings were
that it worked fine on IE and Mozilla-based browsers on Windows. In
Opera it used to fail (but who knows, maybe it works now). On Mac-based
browsers, the results were disappointing, but I don't really remember if
it worked at all.

I recommend that you navigate to a LiveConnect enabled page and test on
your target browsers. For example:
http://www.galasoft-lb.ch/myjavascript/consulting/LiveConnect102
and
http://www.galasoft-lb.ch/myjavascript/consulting/LiveConnect130

I know that
JSObject (Applet->javascript) is not compatible with some browsers,
but I have not found any document indicating that the javascript-

Also, I would like to know if there is any way to detect if a certain
applet is running on a different JVM and obtain a reference to it
(using Javascript).

You mean, from inside a running applet, getting a reference to another
applet running in a different JVM?

I never tried, but I see at least one reason why this will not work.
Getting a reference to another applet in the *same* JVM works because
the both applets run in the same process. However, another JVM will be
another process (you can see that by observing the process list in
Windows' task manager for example), and any interprocess communication
requests marshalling. It would be interesting to try it, but I am pretty
sure it'll fail.

For two applets in the same JVM, try this:
http://www.galasoft-lb.ch/_archive/myjava/CommTest/backup00
Thanks,
Sergio.

HTH,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top