< < < back to article

Example of replacing images on error

This page shows an example of replacing an image when an error occurs.

Normal image

This is a normal image, it works just fine

Image not found

This image cannot be found

Image replaced on error

This image is replaced by some javascript when an error occurs (such as the image not being found) so that something is always displayed to the user

The images used on this page are Copyright © 2012 & 2013 Colin Angus Mackay.