Name: yyT116575 Date: 12/14/2000
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
Enclosed JStoJava.html, JStoJava_Converted.html and JStoJava.java for your
reference.
Steps:
0) Please install JDK1.3.0_01 and JRE1.3.0_01
1)Please copy JStoJava_Converted.html to a file
2) Copy JStoJava.java to a file (with the same name)
3) ensure the classpath including the JAWS.jar located in the jre\lib direcotry
of the JDK1.3.0_01
4) javac JStoJava.java
5) Startup Netscape 6
6) File|Open Web Location in NetScape 6
7) Select JStoJava_Converted.html as the chosen file
8) By Clicking the <Set String to Applet> or <Get String from Applet> Button
nothing happen on the applet and the HTML side.
If you run the JStoJava.class applet in the JStoJava.html before running the
HTMLConverter it is working perfectly with Netscape 6.
/*
* Original HTML Code (Before running HTMLconverter)
* LiveConnect successfully running under NetScape 6
*
* JStoJava.html
*/
<HTML>
<HEAD>
<TITLE>Applet HTML Page</TITLE>
</HEAD>
<BODY>
<APPLET ID="JStoJava" CODE="JStoJava.class" NAME="JStoJava" WIDTH=150 HEIGHT=25>
</APPLET>
<FORM NAME="form1">
<INPUT TYPE="button" VALUE="Set String to Applet"
onClick="document.JStoJava.setString(document.form1.strA.value)">
<BR>
<INPUT TYPE="text" SIZE="20" NAME="strA">
<BR>
<INPUT TYPE="text" SIZE="20" NAME="strB">
<BR>
<INPUT TYPE="button" VALUE="Get String from Applet"
onClick="document.form1.strB.value=document.JStoJava.getString()">
</FORM>
</BODY>
</HTML>
/*
* Converted HTML Code - (After running HTMLConverter 1.3.0_01)
* LiveConnect failed in NetScape 6 environment
*
* JStoJava_Converted.html
*/
<HTML>
<HEAD>
<TITLE>Applet HTML Page</TITLE>
</HEAD>
<BODY>
<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<EMBED type="application/x-java-applet;jpi-version=1.3.0_01" CODE
= "JStoJava.class" NAME = "JStoJava" WIDTH = 150 HEIGHT = 25
scriptable=false
pluginspage="http://java.sun.com/products/plugin/1.3.0_01/plugin-install.html">
<NOEMBED>
</NOEMBED></EMBED>
<!--
<APPLET CODE = "JStoJava.class" WIDTH = 150 HEIGHT = 25 NAME = "JStoJava">
</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->
<FORM NAME="form1">
<INPUT TYPE="button" VALUE="Set String to Applet"
onClick="document.JStoJava.setString(document.form1.strA.value)">
<BR>
<INPUT TYPE="text" SIZE="20" NAME="strA">
<BR>
<INPUT TYPE="text" SIZE="20" NAME="strB">
<BR>
<INPUT TYPE="button" VALUE="Get String from Applet"
onClick="document.form1.strB.value=document.JStoJava.getString()">
</FORM>
</BODY>
</HTML>
/*
* JStoJava.java source code
*/
import java.applet.Applet;
import java.awt.Graphics;
public class JStoJava extends Applet {
String myString;
public void init() {
myString = new String("Applet saying hello to you!");
}
public void paint(Graphics g) {
g.drawString(myString, 25, 20);
}
public void setString(String aString) {
myString = aString;
repaint();
}
public String getString() {
return myString;
}
}
(Review ID: 113680)
======================================================================
- duplicates
-
JDK-4419588 calling applet methods from javascript fails with plugin 1.3.0_01 and Netscape 6
-
- Closed
-
-
JDK-4425384 Can not load the applet on NS6 after converting them using HTML Converter
-
- Closed
-