Solved

Liveconnect Java Javascript arrays

Posted on 2000-04-05
2
366 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
Comment Utility
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
Comment Utility
Superb site - it answered my question.

Ta
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now