Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes > Images > <IMG ...>

Attribute for <IMG ...>
onLoad ="script command(s)"

The onLoad event is fired when the image is finished being downloaded. For example, the following code displays an alert box when the image is downloaded:

<IMG 
 SRC="../graphics/pumpkin.gif" ALT="picture of a pumpkin"
 HEIGHT=100 WIDTH=100 
onLoad="alert('loaded')">

which gives us

picture of a pumpkin

Unfortunately, onLoad is not a very reliable event handler. Netscape particularly has trouble firing onLoad when the image is malformed in some way or if the image is loaded from cache instead of freshly downloaded from the net.

<IMG SUPPRESS="..."> >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com