aspose file tools*
The moose likes Applets and the fly likes Is it a Netscape bug? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Is it a Netscape bug?" Watch "Is it a Netscape bug?" New topic
Author

Is it a Netscape bug?

Rohit Agarwal
Greenhorn

Joined: Jul 13, 2001
Posts: 9
Hi Friends,
I am trying to run a signed applet in an html using the EMBED and OBJECT Tag.
I have put my applet in a jar, signed the jar and put it in a html. I then call a few methods on this applet through Javascript:
document.applets[appletname].methodname()
It works fine in IE. I am able to run and get the results.
When i am using Netscape 4.77 it is giving me this error in javascript:
JavaScript Error: file:/C|/rohit/sec/pass/pass-ns.html, line 9:
no applet with index 9017408
Also after this error if i try and reload the page netscape hangs and i have to then go to the NT Taskmanager and kill the netscape.exe process to begin again.
I have no idea why is it not able to find the applet from javascript.
Is this the problem with embed tag.
The html is as follows:
You can try even without a signed jar with a dummy method in the applet that returns some string.
The html is as follows:
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function button1_onclick()
{
alert(document.forms[0].text1.value);
document.applets[0].setMessageText(document.forms[0].text1.value);
var chksum = document.applets[0].retchksum();
var ofile = document.applets[0].retofile();
document.forms[0].txtchksum.value = chksum;
document.forms[0].txtofile.value = ofile;
}

</SCRIPT>
</HEAD>
<BODY>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 0 HEIGHT = 0 NAME = "TestApplet" ALIGN = middle VSPACE = 0 HSPACE = 0 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME = CODE VALUE = "MyComApp.class" >
<PARAM NAME = CODEBASE VALUE = "." >
<PARAM NAME = ARCHIVE VALUE = "rohitjar.jar" >
<PARAM NAME = NAME VALUE = "MyComApp" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="true">
<COMMENT>
<EMBEDtype="application/x-java-applet;version=1.3"
WIDTH = 0 HEIGHT = 0 ALIGN = middle VSPACE = 0 HSPACE = 0
CODE = "MyComApp.class"
CODEBASE = "."
ARCHIVE = "rohitjar.jar"
NAME = "tedt"
scriptable = true
MAYSCRIPT = true
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
<NOEMBED>
</COMMENT>
</NOEMBED>
</EMBED>
</OBJECT>
<FORM>
<H1>Business logic Tesing with Hidden Trusted Applets</H1>
<hr>
Enter the File name with the path:<INPUT type = "text" name=text1>
<INPUT id=button1 type=button value=Process.. name=button1 LANGUAGE=javascript onclick="return button1_onclick()">
<br>
Check Sum using CRC32 :<INPUT TYPE = TEXT NAME = txtchksum>
Compressed Output File:<INPUT TYPE = TEXT NAME = txtofile>
</FORM>
</BODY>
</HTML>
Can anybody please help me with this.
Rohit


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it a Netscape bug?
 
Similar Threads
Problem while Invoking Applet's method from javascript
JDK 1.5 Compiled Applet not working with JRE 1.4
Unable to load Applet in Tomcat 5.5.12
Unable to load Applet in Tomcat 5.5.12
get error Password Needed - Networking