I faced a problem as to remove image with JS code like a...
... document.getElementById(\'image_X\').src=\'\'
Gets its parent and use removeChild.
var parent = getElementById('parentid'); var child = document.getElementById('imagex'); parent.removeChild(child);