Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
HI all,

I have a asp .net website in which I call an applet.
I capture some data in the applet and store it in an arraylist in applet like this:

public static ArrayList<String> data = new ArrayList<String>();
public ArrayList<String> getImageData()
   {
       data.add("Some value");
       return data;

   }


now i m loading applet in website and calling this getImageData() function
JavaScript
function callApplet() 
{
    try {
        document.applet1.getImageData();
    }
    catch (err) {
        alert("Error: " + err);
    }
}


Now my question is how will i get that retrun arraylist in variable and store that in javascript??
please help..
thanx in advance..:)
Posted
Updated 2-Feb-13 20:03pm
v3

1 solution

Maybe I'm missing something, but just use return.

JavaScript
function callApplet()
{
    try {
        return document.applet1.getImageData();
    }
    catch (err) {
        alert("Error: " + err);
    }
}
var data = callApplet();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900