This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes javascript and applet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "javascript and applet communication" Watch "javascript and applet communication" New topic
Author

javascript and applet communication

pandya devarshi
Greenhorn

Joined: Sep 04, 2008
Posts: 12
I have one method in javascript
Method name is called() Method.Method use is simple alert message box.
I am try to called this from applet using JSObject.
I m try to called the call method of JSObject using the JSObject's reference variable but at the run time applet give me a exception.
exception like

netscape.javascript.JSException: :Member not found.

Code is like this in applet

JSObject jsroot=null;
jsroot = JSObject.getWindow(this);
jsroot.call("called",null);


javascript method is

function calledme(){
alert("Hello");
}

please give me solution

Regards
Devarshi Pandya
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41064
    
  43
The JavaScript method name is not the same as the one you're calling in the applet.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javascript and applet communication
 
Similar Threads
Calling Javascript method in js file from Applet
problem in using JSObject.getWindow() mehod
using Applet to speed up hiding of elements
JSObject error in applet when running in mozilla
how to pass a value from an applet to a html field