[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 376
  • Last Modified:

Liveconnect Java Javascript arrays

I'm trying to access an array in an applet using liveconnect from javascript

Here are my applet and script bits from the HTML

<BODY >
<P>
<APPLET CODE="HelloWorld.class" NAME="HelloWorld" WIDTH=150 HEIGHT=25 MAYSCRIPT=1></APPLET>
<P>

<SCRIPT>
var i, sum;
x = document.HelloWorld.myArray;
document.write(x.[0]);
</SCRIPT>

Here is the array in the applet

public String[] myArray = {"one", "two", "three"};


All I get printed out is undefined - shouldn't the Java array be wrapped as a JavaArray by Javascript.  I'm using IE5, but it doesn't work in Netscape either.

Any decent liveconnect links (i.e. not the crappy netscape ones) with decent examples, help etc. would be much appreciated.
0
yatest5
Asked:
yatest5
1 Solution
 
pyxideCommented:
a decent link :
http://www.tactika.com/realhome/realhome.html
click on "interaction with javascript" in the applet menu.
0
 
yatest5Author Commented:
Superb site - it answered my question.

Ta
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now