Hi. Is there anyway to display an alternative image when there's a broken image? So for example, if I forgot to upload an image, it would show something like notavailable.jpg thanks oh, and is there anyway to disable image links until the page is fully loaded?
The object element allows for failthrough. A simple example: <object type="image/jpeg" data="some.jpg" height="75" width="200"> <object type="image/jpeg" <!-- this is the first alternative --> data="another.jpg" height="80" width="100"></object> <p>Me, rock climbing. I'm such a fool.</p> <!-- second alternative --> </object> Code (markup): All modern browsers support the object element. IE is not a modern browser, and its support is crappy. Test. I don't think it will work for IE. The really sad thing is that Lynx, a text only browser, supports object correctly.[1] The trouble is, that's the only mechanism that allows for alternative content. With <img>, you'll have to settle for the alt attribute. cheers, gary [1] It also does inline quotes, the q element, right, while IE fails. Another basic html element not supported by IE. That POS needs to die.
I've just set the background property of the images via CSS to the 404 image. When an image loads normally, it'll cover the background. And yes, modern browsers support transparent PNGs too (which disqualifies IE )
Nice work around. Should work well unless images in general are a problem. Take care about size mis-matches. cheers, gary