Roberto Gallo wrote:
I have an applet running inside an html document and I need to read and
to set some of html form's textfield and textarea input from my applet.
How can I do that? Do I need a javascript?
You need LiveConnect Java --> JavaScript so start with
<applet mayscript ...></applet>
in the HTML markup so that the browser allows the applet to call into
script.
Then in the Java applet you need to import
import netscape.javascript.*;
then you can do
JSObject window = JSObject.getWindow(this);
in the applet to get the JavaScript window object wrapped as a JSObject
in Java. Then you can access members, call methods or evaluate script
code, see
<http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/java_js.html>
for details.
--
Martin Honnen
http://JavaScript.FAQTs.com/