Applet Interaction with JS

E

Ernesto

Hello,
I've seen a Java Applet react to client code written in JavaScript
(and even call JS functions as events raised within the applet) and I
am
wondering the "behind the scenes" of that feature.

Do you know the mechanisms that make possible that an Activex or Java
Applet could interact with client side JavaScript on a browser?

Maybe this is not the place for this question, I am sorry if that is
the case...

TIA
 
B

Bart Van der Donck

Ernesto said:
I've seen a Java Applet react to client code written in JavaScript
(and even call JS functions as events raised within the applet) and I
am wondering the "behind the scenes" of that feature.

Do you know the mechanisms that make possible that an Activex or Java
Applet could interact with client side JavaScript on a browser?

http://www.google.com/search?q=MAYSCRIPT
 
R

Richard Maher

Hi Bart,

Bart Van der Donck said:

I looked through that list fairly exhaustively and got bogged down with much
that was up to 10 years old. I don't know if Ernesto had better results but
could you (or anyone else) please help with some further details?

Is the JSObject (which seems to be an aka for LiveConnect) still the chosen
interface for this sort of stuff? the eval() and call() methods seem
straight forward, but I also saw some W3C DOM level access Java classes with
thread concurrency issues. Which is the current or state-of-the-art
interface for (in my case) calling JavaScript from Java?

Are there any examples of the DOM.run() Applet option available?

I'm not sure what Ernesto was looking to do, but I would like to have a
thread waiting with a Read on a TCP/IP Socket and when data arrives, call
back to the JavaScript so that the received data could be displayed. Any
ideas?

Cheers Richard Maher
 
T

Thomas 'PointedEars' Lahn

Ernesto said:
Do you know the mechanisms that make possible that an Activex or Java
Applet could interact with client side JavaScript on a browser?
http://developer.mozilla.org/en/doc...ect_Overview:Java_to_JavaScript_Communication

Maybe this is not the place for this question, I am sorry if that is
the case...

Indeed it isn't. ActiveX programming is on-topic in
microsoft.public.activex.controls, and Java programming is on-topic in the
comp.lang.java.* hierarchy. You could have used your favorite search engine
before your posted.


PointedEars
 
R

Richard Maher

Thomas 'PointedEars' Lahn said:

Does anyone please have a reference as to when one would use the "Common DOM
API" instead of JSObject? Was the former still-born? Apples and Oranges?

I like the look of the JSObject.call method but is there any documentation
out there that discusses thread-saftey? i.e.Can I have a seperate thread in
an Applet reading from a Socket and when data arrives
JSObject.call(myJavaScriptOutputFuntion)?

Would execution be deferred until the Applet exits or does the JavaScript
code activate in the context of the Applet's thread?

Recurrsion ok?

Any similar examples anywhere?

Cheers Richard Maher
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top