M
mleaver
I want to open a second window and display a binary image that is returned from
a java program via XMLRPC. The data returned is a binary encoded base64 png
file. If I write the data out to a file on my server, I can display it using
the following javascript:
var windowHandle =
window.open('about:blank','windowName','width=250,height=250');
windowHandle.document.write('<img name="myImage" src="images/test.png">');
and the image displays fine. But if I return the binary encoded data to my
javascript function via a variable, how would I display it in the other window?
I've tried the following, and get no console errors, but the image doesn't
display:
var windowHandle =
window.open('about:blank','windowName','width=250,height=250');
windowHandle.document.write('<img name="myImage" src="javascriptng">');
where png is the variable that contains a base64 binary array representation of
the png file that was returned from the server.
What is the correct way to display a base64 image directly?
a java program via XMLRPC. The data returned is a binary encoded base64 png
file. If I write the data out to a file on my server, I can display it using
the following javascript:
var windowHandle =
window.open('about:blank','windowName','width=250,height=250');
windowHandle.document.write('<img name="myImage" src="images/test.png">');
and the image displays fine. But if I return the binary encoded data to my
javascript function via a variable, how would I display it in the other window?
I've tried the following, and get no console errors, but the image doesn't
display:
var windowHandle =
window.open('about:blank','windowName','width=250,height=250');
windowHandle.document.write('<img name="myImage" src="javascriptng">');
where png is the variable that contains a base64 binary array representation of
the png file that was returned from the server.
What is the correct way to display a base64 image directly?