W3C home > Mailing lists > Public > www-validator@w3.org > January 2007

onload issue with an image

From: C. Quilliot <c.quilliot@free.fr>
Date: Sun, 21 Jan 2007 20:34:32 +0100
Message-ID: <45B3C048.5090803@free.fr>
To: www-validator@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:23 GMT