Solved

Liveconnect Java Javascript arrays

Posted on 2000-04-05
2
372 Views
Last Modified: 2008-03-17
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
Comment
Question by:yatest5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
pyxide earned 50 total points
ID: 2688264
a decent link :
http://www.tactika.com/realhome/realhome.html
click on "interaction with javascript" in the applet menu.
0
 
LVL 1

Author Comment

by:yatest5
ID: 2689136
Superb site - it answered my question.

Ta
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question