| Author |
IE's Ugly red X
|
Bob Backlund
Ranch Hand
Joined: Jun 05, 2003
Posts: 51
|
|
Hi guys, Just a quicky. Anyone know of a way to replace the ugly Internet Exploere "image not found" red X with something a little nicer? Basically I have a page which will list a number of images but some of them may no longer exist, so I want the page to display a default 'image unavailable' pic instead of the ugly red X Cheers
|
Cheers!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
Hardly a JSP question. Moved to the HTML forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
There is no standard mechanism to do this, and I doubt that IE provides a proprietary facility to do so, but you'd have to check the MSDN site to be sure. Since you originally posted this to the JSP forum I assume you are wanting this for a JSP-generated page. What you might consider is writing your own custom image tag that would check for existance of the file and substitute a non-ugly replacement image of your own.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
<img src="asdf" onerror="this.src='error.jpg'" Eric
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
Wow, cool trick Eric! Completely non-standard, but works in Firefox, Safari and Opera (and I imagine IE). I'd approach any non-W3C feature with caution, but this one does seem to have broad browser support.
|
 |
 |
|
|
subject: IE's Ugly red X
|
|
|