BlobFisk

msg:3629125 | 2:29 pm on Apr 17, 2008 (gmt 0) |
Hi stevelibby, There is an onError attribute that can be used to detect if the image doesn't load. I'm not sure how supported this is though! <img src="link/to/image.gif" alt="Alt Text" onError="imageError(this)" /><script type="text/javascript"> function imageError(element) { element.style.border = '1px solid red'; } </script>
In principle this should work, but I've not tested it! HTH [edited by: BlobFisk at 2:30 pm (utc) on April 17, 2008]
|
BlobFisk

msg:3629154 | 3:01 pm on Apr 17, 2008 (gmt 0) |
Just did a quick test and that's IE only.
|
vincevincevince

msg:3629159 | 3:07 pm on Apr 17, 2008 (gmt 0) |
You could use javascript from the body's onLoad event and loop through images, checking their size. If the image has no width or height (i.e. it never loaded), then change the src property of the image to the default one.
|
Achernar

msg:3629281 | 5:18 pm on Apr 17, 2008 (gmt 0) |
| Just did a quick test and that's IE only. |
| It works in FF too (and Opera, and Safari).
|
|