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
Solved

Liveconnect Java Javascript arrays

Posted on 2000-04-05
2
370 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jar file executable 12 58
tomcat startup error 5 104
JAVA API design with micro service cloud in mind 1 47
ejb entity bean example 2 15
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

838 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