aspose file tools*
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
Author

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.

regards
FI
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41843
    
  63
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).


Ping & DNS - my free Android networking tools app
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

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
[code]
public class MyApplet extends Applet{

public String title

..... your code to set title

}

Then

<html>
<head>
<script>
function testF(){
alert(myapplet.title);
}
</script>
</head>
<body>
<OBJECT id="myapplet"
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="1" height="1">
<PARAM name="code" value="MyApplet.class">
</OBJECT>
</body>
</html>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling Java Method from java Script using IE.5(Urgent)