This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4102 - <img onload>
Summary: <img onload>
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Olivier Thereaux
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-19 18:36 UTC by Denis Germ
Modified: 2007-03-08 23:33 UTC (History)
1 user (show)

See Also:


Attachments

Description Denis Germ 2006-12-19 18:36:25 UTC
Hi.

I've a little problem with the tag "onload". Each browser supports this command, but on wc3 its permanently an error... This is the only error on the page :(

I need this, becouse i have transparent images, and the IE6 is unable to display transparency :/
So i need Javascript to fix this error.... +

MFG
Comment 1 Olivier Thereaux 2006-12-20 18:30:11 UTC
In all standardized versions of HTML, onload is only available for body and frameset elements, not img.

see e.g.
http://www.w3.org/TR/html401/interact/scripts.html#events
Comment 2 Maciej Jaros 2007-03-08 14:39:14 UTC
I believe this should be reconsidered. I have a JavaScript 1.3 reference manual which says that onLoad is available since 1.1. You can probably find it somewhere on the net.

OnLoad works in all browsers supporting JavaScript I know off and so in real this is a standard, so why isn't it a standard for W3C?
Comment 3 Olivier Thereaux 2007-03-08 23:33:41 UTC
(In reply to comment #2)

> OnLoad works in all browsers supporting JavaScript I know off and so in real
> this is a standard, so why isn't it a standard for W3C?

The onload event is present in standard HTML specifications, but, as mentioned in Comment #1, it is only allowed for the body element.

If you believe that it should be available for other elements, this bugzilla, and by extension, the markup validator, is not the right place to ask: the validator validates exstablished standards, and does not discuss the why of things. If you want to ask why onload is only available for <body> or suggest it be added to other elements in a future version of the HTML standard, you want to discuss in the public mailing-list www-html@w3.org