File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Applets
Bookmark "javascript and applet communication" Watch "javascript and applet communication" New topic

javascript and applet communication

pandya devarshi

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);"called",null);

javascript method is

function calledme(){

please give me solution

Devarshi Pandya
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
The JavaScript method name is not the same as the one you're calling in the applet.
I agree. Here's the link:
subject: javascript and applet communication
jQuery in Action, 3rd edition