Broken Image Icon Replacement ?
Is there a way to replace the image that you see in a broken image link (red "X" in IE) with one of your own ?
I know you can use an onerror condition in the img tag to do something like this:
My problem is that the img tag source is being generated by a third party application and I do not have access to modify the actual HTML.
<img src="myBigImage.jpg" onerror="this.src='brokenImageIcon.jpg';">
I thought about creating a function that would run with a body onload condition, scanning for img tags and inserting an onerror function into each, but since this would be after the html body loads, which I assume would end up being be too late to catch an img load error.
Is there some global onerror condition I could use ?
Some css pseudo class trickery ?
Any ideas ?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)