I am sure this can be done in Javascript but am not finding the right way to do it. My page has an image in it which actually is an external url calling the image froma remote server. Now this image gets updated frequently in its location and hence sometimes I get an error or the red cross showing image not available.
Is there some way I can preload the image on the page and display it only if it has sucessfully downloaded or else show a different error image in its place telling users to try again.
Any other ideas on how I can do error handling with loading an image on a page i.e show image if successfully downloaded or display error image in place.
One more thing I wanted to add is that the image has an image map with an href over it allowing users to update the image data without reloading the whole page. So users might do multiple clicks on that image.
Any help is greatly appreciated.
Thanks
Is there some way I can preload the image on the page and display it only if it has sucessfully downloaded or else show a different error image in its place telling users to try again.
Any other ideas on how I can do error handling with loading an image on a page i.e show image if successfully downloaded or display error image in place.
One more thing I wanted to add is that the image has an image map with an href over it allowing users to update the image data without reloading the whole page. So users might do multiple clicks on that image.
Any help is greatly appreciated.
Thanks