RE: Show JPEG From JavaScript/XMLHttp?



Hello Lucius,

Web application is different from windows form application. In winform
world, we could load binary array from webservice and set it as the
picturebox.date. But, this way is not supported in web application.

Actually, there is way to embed image data inside a URL if you play with
firefox, safari browsers. However, IE doesn't support it. (maybe will
support it in the further...)

data:[<MIME-type>][;base64],<data>

http://en.wikipedia.org/wiki/Data:_URL
[data: URI scheme]

Hence, in IE, if you want to load images from webservice, only two methods
could achieve this.
1) As John said, save the image in file on the server and set img.src to
it.
2) create an IMG element and assign the url to a special page which could
display the image by webservice. ( as Anthony said)

Hope this helps.
Sincerely,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages