Does anyone know if there is a way to have Internet Explorer not show the “Red X” for a missing image?
Thanks,
JoeB
Does anyone know if there is a way to have Internet Explorer not show the “Red X” for a missing image?
Thanks,
JoeB
Don’t have missing images.
A Red X means that an image is missing and not showing up on the page. Either it is a bad link to the image or the image hasn’t been uploaded to the server.
Nadia
Ok that’s the simple answer, but that’s not an option. I wouldn’t ask a question that easy!
The images are hosted off site and are maintained by another system. They are not always available, thus the missing images.
In Firefox and Camio the missing images are skiped over without a notice.
Is there a javascript or some other hack where if the image cannot be loaded I can show maybe a 1px gif? or something else. The php code if (file_exists()) does not check remote images.
Any ideas?
Thanks
JoeB
You could always send a HTTP request somehow; if the request returns a status code of 404 then it’s not available. But that’s a lot of work to avoid a missing image.
If you need the image there that badly host it yourself.
I am in the process of moving the images local but there are about 135,000++ images to host. This is for a MLS real estate listing site. The problem right now is that the site is live with broken images on almost every page load.
I am looking for a hack in the mean time while the site is recoded and I work out how to host the images locallly. Anyone with some ideas to help me for the transition are welcome!
Its really simple…people have gotten so caught-up in css and standards lately that they have forgotten how helpfull html can be…
onerror write something…like this
<img src=“goober.gif” onError=“document.write(‘no image’);”>
there you have it…
THANKS rjm1982!!! That works perfectly. Nice and simple.