Meaningless Drivel is fun!*
The moose likes Applets and the fly likes Using AJAX with applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Using AJAX with applets" Watch "Using AJAX with applets" New topic
Author

Using AJAX with applets

Mahesh KumarKing
Greenhorn

Joined: Jun 22, 2007
Posts: 2
Hi,

Is it possible to return a byte[] from the applet to a javascript object?
When i return a string (eg. : (new String(myByteArray))) from the applet, my implementation works fine, but my requirement is to transmit a byte[].
Is it possible?

Regards,
Mahesh.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41184
    
  45
Generally, transferring arrays should work. Did you try it?
[ June 25, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Mahesh KumarKing
Greenhorn

Joined: Jun 22, 2007
Posts: 2
Hi, I tried returning a byte[]. But the javascript variable holding the return value from the applet value is empty, i.e. to say the byte[] return value could not obtained in a javascipt variable/object.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using AJAX with applets
 
Similar Threads
Invoke java method from JavaScript (not applet!)
Can I return binary object in my response?
Accessing image in a zip file
Returning Steams instead of Byte Arrays
Invoke java method from JavaScript (not applet!)