How do I show a loading image before the thumbnail loads?

Hi, I am adding a thumbs type in an app similar to the “File Explorer” demo application. I want to show a loading image before the thumb picture is created dynamically by a thumb creator. How do I do that? Here is the code that controls what image to show.

dhtmlXDataView.prototype.types.fthumbs.image=function(obj){
if(obj.cell[0]==‘jpg.gif’ || obj.cell[0]==‘png.gif’ || obj.cell[0]==‘gif.gif’){
//create thumbnail dynamically
return “thumb_creator.php?id=”+obj.id;
}
return “path/icons/”+obj.cell[0]; //non-thumbnail icons
};

You will need to change templates of thumbnail.
While currently it looks as

<div align='center'><img border='0' src='{common.image()}'><div class='dhx_item_text'><span>{common.text()}</span></div></div>

You need to change it as

<div align='center'><img border='0' src='some/loading.gif'><img border='0' src='{common.image()}' style='width:1px; height:1px;' onload='this.previosSibling.style.display="none"; this.style.width = this.style.height = "18px"; '><div class='dhx_item_text'><span>{common.text()}</span></div></div>

Thank you so much. It worked. There is a typo in your code:
this.previosSibling should be this.previousSibling