Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
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..Smile | :)
Posted 31-Jan-13 20:18pm
MAU7871.5K
Edited 2-Feb-13 20:03pm
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Maybe I'm missing something, but just use return.
 
function callApplet()
{
    try {
        return document.applet1.getImageData();
    }
    catch (err) {
        alert("Error: " + err);
    }
}
var data = callApplet();
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Guruprasad.K.Basavaraju 446
1 Sergey Alexandrovich Kryukov 360
2 Shai Vashdi 318
3 OriginalGriff 265
4 Peter Leow 171
0 Sergey Alexandrovich Kryukov 9,109
1 OriginalGriff 5,290
2 Peter Leow 4,010
3 Maciej Los 3,535
4 Abhinav S 3,263


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid