I m trying to execute some code when image is not loaded. I m using following code:
<script language="javascript">
object = new Image();
object.src = '$imageurl';
if(!object.complete)
{
//do something
}
</script>
But this is not working in Facebook. Please help me.
Run a function using
window.setIntervalwhile the image is loading and stop it as soon as it has loaded.