Image Data via Ajax - how can I display the image on the Page
- by Mike B
I am creating a Domino Document via AJAX that contains a photo.
I am able to get the base64 image data back to the server in a Notes Domino Document.
Data is stored in a Richtext (textarea) field as
"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAFA..........." - (this goes on for several lines)
I am trying to display on the Domino Webpage using passthru tag
<<image id= "pic1" >>
in the onLoad event of the Form i try to shove the data into the image element using this code:
//Photo Stuff
alert(document.forms[0].photo1.value);
document.getElementById("pic1").src = document.forms[0].photo1.value;
The alert is showing the data.
Picture is not appearing.
Please help.
Thanks
Mike