Connecting Tech Pros Worldwide Help | Site Map

image onload

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 18th, 2006, 12:05 AM
quickcur@yahoo.com
Guest
 
Posts: n/a
Default image onload

Hi all,

What happend to the onload event of <img src=myimage.jpgtag if the
myimage.jpg is not available? My feeling is that the onload is not
called at all. How can I capture the event if the link is broken?

Thanks,

qq


  #2  
Old July 18th, 2006, 12:45 AM
Kevin Darling
Guest
 
Posts: n/a
Default Re: image onload


quickcur@yahoo.com wrote:
Quote:
What happend to the onload event of <img src=myimage.jpgtag if the
myimage.jpg is not available? My feeling is that the onload is not
called at all. How can I capture the event if the link is broken?
For IE, set up the onerror property:

<img src="myimg.jpg" onload="doGood()" onerror="doBad()">

Whoa. While testing this, I just found that the onload event fires
each time an animated GIF loops. Never noticed that before. Bug?

Kev

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.