wait till image is loaded completely
by kalai[ Edit ] 2010-01-28 15:10:13
<script type="text/javascript">
var imgloaded = false;
function btnclick(){
if(imgloaded)
document.getElementById("yourImgId").style.display="block";
}
</script>
<img id="yourImgId" src="yourimg.jpg" onload="imgloaded=true;" />