I need to change the html img src value dynamically from the value from hidden text field using Jquery or Java script.
<p><img id="yui_img" height="333" width="345"></p>
function onImgChange()
{
document.getElementById('yui_img').src=document.getElementById('addProductLinksCreateForm:addProductLinkUrlValue').value;
}
I got the value in the DOM but it is not getting reflected in it. Old image is maintained.