Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Is it a Netscape bug?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
Look! I laid an egg! Why does it smell like that? Tiny ad, does this smell weird to you?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic