LiveConnect: XUL JavaScript <-> Java
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <1169684214.045186.27100__35051.3613004752$1169684430$gmane$org@s48g2000cws.googlegroups.com> |
Hello!
I am working on the connection between my XUL GUI with JavaScript and
my Framework in Java.
For this I wanna use LiveConnect.
Calling java-methods from javascript works fine. I already have managed
that. (I'm calling the methods by
Packages.packageName.JavaClassName.methodName(); )
But now I have to get it working in the other direction. I want to call
a JavaScript function from my java framework. How can I do this?
I have tried it with creating an object of the java-class in javascript
and calling the java-method, that trys
Code:
JSwindow = JSObject.getWindow(this);
JSwindow.call("functionName", null);
But I can't acces my JavaScript.
Do I need to allow the access expizit? How do I do this in XUL/JS?
Or do I have to load the java-class as an applet?
Thanx for ur help!