Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Javascript Java Applet
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 21:18pm
MAU7871.6K
Edited 2-Feb-13 21: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
0 Maciej Los 434
1 ridoy 368
2 DamithSL 270
3 OriginalGriff 159
4 Suvendu Shekhar Giri 150
0 OriginalGriff 7,968
1 DamithSL 6,179
2 Sergey Alexandrovich Kryukov 5,524
3 Maciej Los 5,438
4 Kornfeld Eliyahu Peter 4,539


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100