Scripting a Java applet stopped working after reinstall of XP...

D

Dag Sunde

I've been working on a system that have been running
for the last couple of years, but stopped working
on my dev. machine after reinstalling WinXP yesterday.

To my knowledge, it have been set up with the same
version of tools as I've always used.

The following function does not call .clearTable() anymore.
(That is...
typeof document.getElementById('bidApplet').clearTable
returns 'undefined' all of a sudden...)

function clearJavaTable() {
var javaBidTable;

if (typeof document.getElementById('bidApplet').clearTable != 'undefined')
{
javaBidTable = document.getElementById('bidApplet');
javaBidTable.clearTable();
}
}

The Java method in question is defined as:

public void clearTable()
{
// Clear the rest of the table...
for(int i=0; i<table.getRowCount(); i++)
{
table.setValueAt("", i, COL_PRICE);
table.setValueAt("", i, COL_VOLUME);
table.setValueAt("", i, COL_DURATION);
table.setValueAt("", i, COL_REST_TIME);
table.setValueAt("", i, COL_STATIONGROUP);
table.setValueAt("", i, COL_COMMENT);
}
}

My Java (plugin) version is 1.4.2_06

The page embedding the applet is defined as:
<div class="appletLayer">
<object
id="bidApplet"
classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width = "415"
height = "150"
align = "middle"
vspace = "0"
hspace = "0"
codebase =
"http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,1
,0">
<param name = "code" value = "no.orion.rkom.BidApplet"/>
<param name = "codebase" value = ".">
<param name = "archive" value = "rkom.jar"/>
<param name = "name" value = "bidApplet"/>
<param name = "mayscript" value ="true"/>
<param name ="type" value
="application/x-java-applet;version=1.3"/>
<param name ="stationGroups" value ="<%=sStationGroups%>"/>
<param name ="durationRange" value ="<%=durationRange%>"/>
<param name ="restRange" value ="<%=restRange%>"/>
</object>
</div>

Anyone have a clue as what may cause this?

TIA...
 
R

Real Gagnon

I've been working on a system that have been running
for the last couple of years, but stopped working
on my dev. machine after reinstalling WinXP yesterday.

If you access the Applet from HTML or Javascript you are supposed to have

<PARAM name="scriptable" value="true">
this is needed for tthe plugin 1.4 or better.


You have <param name = "mayscript" value ="true"/> which is useful only
when you access javascript or DOM element from Java.

Also you said that you have the plugin 1.4.2 but in the OBJECT tag you
have a reference to the version 1.3

Bye.
 
D

Dag Sunde

Real Gagnon said:
If you access the Applet from HTML or Javascript you are supposed to have

<PARAM name="scriptable" value="true">
this is needed for tthe plugin 1.4 or better.

I did some testing, and found that the "scriptable" parameter
is not enforced in java 1.4.1_21, but *is* enforced in 1.4.2_06.
You have <param name = "mayscript" value ="true"/> which is useful only
when you access javascript or DOM element from Java.

I know, but I thought it worked for both... :-\
Also you said that you have the plugin 1.4.2 but in the OBJECT tag you
have a reference to the version 1.3

That is because my applet requires 1.3 or higher...


Thanks a lot for the pointer, it certainly helped solve my problem.
 
A

Alfred Z. Newmane

Real said:
If you access the Applet from HTML or Javascript you are supposed to
have

<PARAM name="scriptable" value="true">
this is needed for tthe plugin 1.4 or better.


You have <param name = "mayscript" value ="true"/> which is useful
only when you access javascript or DOM element from Java.

Also you said that you have the plugin 1.4.2 but in the OBJECT tag you
have a reference to the version 1.3

He could also be missing the JVM for what ever browser he is using
(IE?), as IE6 stopped coming with a JVM. You can use MS's or Sun's.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top