Solved

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

Posted on 2001-06-07
2
187 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 30 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse shortcuts 9 54
egit plugin on eclipse 8 62
oracle 11g 23 78
by zero exception 10 39
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

776 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