HOWTO set a value to an invisible input text of a HTML page with an Applet?

Hello!

HOWTO set a value to an invisible input text of a HTML page with an Applet?

thanks
jussaraAsked:
Who is Participating?
 
smileyxxConnect With a Mentor Commented:
In Netscape, you may use Java to JavaScript communication.

For example, in the applet

import netscape.javascript.*;

public void setValue(String value) {
 JSObject win = JSObject.getWindow(this);
 win.eva("document.FormName.HiddenFieldName.value="+value);
}

and in the html,

<form name=FormName>
  <applet ... MAYSCRIPT><!-- mayscript is necessary -->
   <input type=hidden name=HiddenFieldName>
</form>
0
 
smileyxxCommented:
This will also work in Internet Explorer 4 and above.
All your applet needs is the JSObject class, which you can extract from the java40.jar file distributed with Netscape.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.