joecool2005 Posted February 28, 2007 Share Posted February 28, 2007 Hi,When I have an error on my image, how can I replace it with another image?(I want to replace image.gif with another one)<img src="image.gif" onerror="alert('The image could not be loaded.')"> thx Link to comment Share on other sites More sharing options...
smiles Posted February 28, 2007 Share Posted February 28, 2007 delete image.gif and put another image into the folder contain the previous image and rename it as image.gifhope I understand you right ??? Link to comment Share on other sites More sharing options...
pulpfiction Posted February 28, 2007 Share Posted February 28, 2007 If the image "picture.gif" is missing then it will load "missing.gif".... are you looking for something like this?<img src="picture1.gif" onerror="this.onerror=null;this.src='missing.gif';"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now