- Sometime Today, govindaraj assembled some asciibets to say:
> I have done like the following methodumm, the standard way to change an image's src is to set its .src
> // ajaxObj.responseText is './images/userimg.jpg'
> document.getElementById('imageSrc').innerHTML = ajaxObj.responseText;
document.getElementById('imageSrc').src = ajaxObj.responseText;
Also, that ./ in the responseText will make it a local file, ie, it will
only work on the computer that actually has the image (your computer)
and not on anyone else's computer. You need to pass in a full (absolute
or relative) url.