Hi, I have problem with dynamically created image (JavaScript). I want to change the innerHTML property of a table cell:
var x=document.getElementById('myTable').rows;
var y=x[0].cells;
var myImg = document.createElement('img');
myImg .setAttribute("alt","");
myImg .setAttribute("style","vertical-align: middle; visibility:visible");
myImg .setAttribute("src", "http://valid_link/ajax-loader.gif");
y[0].innerHTML = myImg ;
but, as the result I see "[object HTMLImageElement]". How to show that picture ?