I have an empty img in my page <img ... src=""/>
When an event occurs I set the img attribute to an inline png data:
<img ... src="data:image/png;base64,..."/>
When another event occurs I set the src to nothing (remove the img): myImg.src = ""
The problem is: The img doesn't reload when I set src to nothing. If I hide the img, wait some time and show it again it works but it's an ugly hack...
P.S: I don't want to set a default 'blank' image I need it to be really blank (src = "").
Edit: My javascript:
biometria.setImage = function(png) {
if(png)
bioCanvas.src = 'data:image/png;base64,' + png;
else
bioCanvas.src = '';
};
Edit2: Browser: Google Chrome 18.0.1025.162 Ubuntu 12.04