Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2001-06-07
2
Medium Priority
?
195 Views
Last Modified: 2010-05-18
Hello!

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

thanks
0
Comment
Question by:jussara
  • 2
2 Comments
 

Accepted Solution

by:
smileyxx earned 90 total points
ID: 6165807
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
 

Expert Comment

by:smileyxx
ID: 6165901
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question