onload issue with an image

Hi all,

I am using the "onload" attribute with an image in an XHTML page.
It is already written in lowercase.

The validator reports that "the attribute is not a valid attribute", 
whereas the W3 school states it is a valid attribute for an element of 
type <img>:
http://www.w3schools.com/htmldom/event_onload.asp

So, which one is right ?

My source code:

<img onload="OnLoadImg(this)" src="something.jpg" alt="" class="acc2" /></a>


This is my last error for a valid homepage, so any idea is welcome (how 
to run javascript on an image once it is loaded ?)

Complete source code available at : http://www.ptitbonhomme.com

Thanks in advance !

Cedric

Received on Sunday, 21 January 2007 23:43:45 UTC