PDA

View Full Version : Detect if an image has loaded or not



trollger
05 Dec 2010, 06:00 PM
Basicly I am trying to make an image gallery and I have a loading gif animation. So what I need is something simular as follows...

if( document.getElementById("MyImg") == notloaded ){
// Show loading gif
}

else{
//show the image
}

Line one is the line I don't know how to make. I can make the rest though. Any help is appreciated.