phillipstack phillipstack - 1 month ago 7x
HTML Question

How do I use jsp form element contents (base64, text) as my html image src?

The jsp form contents are already formatted as such:

<form id="textpage"
<textarea name="textbox" id="text">

I want to click a button on another html page

<button>Load Image!!</button>

and replace an existing image placeholder src="putImageHere.png" with


ALSO !!! The src above must be a variable as it will be different each time its loaded so it cant be hard coded.


So basically I ended up loading an element with jquery and in the end it was as simple as

    $('#myImage').attr("src", $('#elementId').innerHTML);