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>:

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 !

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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:50 UTC