Probably this can help you.
jQuery.Preload: http://flesler.blogspot.com/2008/01/jquerypreload.html

The Placeholder Mode has a notFound option to set an alternative
image.
Also, using the onComplete event, you can do something specific for
those that failed.

Cheers

--
Ariel Flesler
http://flesler.blogspot.com

On 24 abr, 20:37, JimD <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> For awhile now I have used a simple onerror check to show an
> alternative if an img url is broken in the page. Something as shown
> below. Problem with this script, it will produce an error if the
> alternative image is actually not available as well. Can any one point
> me to a jquery solution if available? I was thinking I could probably
> use the dimensions plugin, get the width of any image on the page and
> if the width is 0 display the alternative missing image.
>
> <html>
> <head>
> <script language="JavaScript" type="text/javascript">
> function ImgError(source)
> {
> source.src = "/images/noimage.gif";
> source.onerror = "";
> return true;}
>
> </script>
> </head>
> <body>
> <div><img src="http://jquery.com/images/bibeault_cover150A.jpg";
> border="1" height="100" alt="image" onerror="ImgError(this)"></div>
> </body>
> </html>

Reply via email to