my dog learned polymorphism*
The moose likes Applets and the fly likes Javascript, Applets, and Parameter Passing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Javascript, Applets, and Parameter Passing" Watch "Javascript, Applets, and Parameter Passing" New topic
Author

Javascript, Applets, and Parameter Passing

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
I want to call a method in a applet that merely reprints the applet with a different value than what was initially printed to the applet. The method will accept a string and print that to the applet. I was wondering how to pass a string from a javascript to the applet and re-print the applet with that string. Could someone please answer this? Thanks.

Rob
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
The solution to calling from JavaScript to Java is called "LiveConect", and some info about it can be found here.

I don't understand what you mean by "(re-)print the applet".


Ping & DNS - my free Android networking tools app
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 815
I was looking to communicate between javascript on a webpage and an applet on the same page. I had to close the browser and re-open the page before it worked. What I meant by re-paint was how to call the paint method again for the applet since I had code in there that I wanted to trigger using a javascript method. It works fine now anyway. The re-opening of the page seems to resolve that problem. Thanks for the response.

Rob
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript, Applets, and Parameter Passing
 
Similar Threads
passing a parameter back to my HTML page from my applet
Print the Applet Page using java script or Html
Returning array from applet to JavaScript
print JTree
Returning byte array to JavaScript from Java applet