kennyisaheadbanger
kennyisaheadbanger

Reputation: 488

How do I send messages from Javascript to Java?

I'm kind of stuck because I can get JavaScript to send a message to a Java applet. I can get it to work the other way round. Does anyone know a proper way to do this that works everywhere?

Upvotes: 3

Views: 1166

Answers (2)

Andrew Duffy
Andrew Duffy

Reputation: 6928

You may need to add <PARAM NAME="scriptable" VALUE="true"> to the OBJECT or APPLET tag.

Upvotes: 3

Vinay Sajip
Vinay Sajip

Reputation: 99365

For calling Java from JavaScript, you can have public methods in your applet that you call from JavaScript. See this post for more information.

For calling JavaScript from Java, you use JSObject.

Upvotes: 2

Related Questions