Monday, May 21, 2012

put jpg data from xmlhttprequest into <img /> tag

here is some part of my code"GET", theUrl, true);
document.imglive.innerHTML = '<img src="data:image/jpeg,' + xmlhttp.responseText + '"/>';

that don´t seem to work.
i also tried

document.imglive.src= xmlhttp.responseText;

that neither worked

I checked some of the asked questions here but none of the answers where helping at this porblem.

No comments:

Post a Comment