Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Applets and the fly likes Calling Java Method from java Script using IE.5(Urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Calling Java Method from java Script using IE.5(Urgent)" Watch "Calling Java Method from java Script using IE.5(Urgent)" New topic

Calling Java Method from java Script using IE.5(Urgent)

faisal khan
Ranch Hand

Joined: Mar 13, 2002
Posts: 47
Kindly help me in this context as mentioned in subject.

I have Security Provider Jar File, which generates Security Key of data on client side.

We dont face any problems in our desktop based application in Swing.

But we are facing problems in Internet application regarding this issue.

We are using IE.5, we want to generate Key using JavaScript on client side before posting the information on server.

Kindly help me how to call java api using javascript!

We are avoiding to use APPLET? but if no possibilty is there then share info regarding applet communication using javascript.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
You may be able to use a technology called LiveConnect to call from JavaScript into a Java applet; the Applets FAQ has some pointers on that.

JavaScript can't call other Java code (like a separately running desktop application).
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Moving to Applets forum, as by necessity an applet will be involved here.

[Jess in Action][AskingGoodQuestions]
Ernesto Leyva
Ranch Hand

Joined: Feb 23, 2006
Posts: 62
IE does not fully support LiveConnect. However
if you declare public member vars and methods
in your applet you should be fine.

For instance
public class MyApplet extends Applet{

public String title

..... your code to set title



function testF(){
<OBJECT id="myapplet"
width="1" height="1">
<PARAM name="code" value="MyApplet.class">
I agree. Here's the link:
subject: Calling Java Method from java Script using IE.5(Urgent)
jQuery in Action, 3rd edition