W3C home > Mailing lists > Public > www-html@w3.org > September 2001

RE: onLoad

From: Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Mon, 24 Sep 2001 13:26:32 +0200
To: "Brian Fletcher" <bf001b4869@blueyonder.co.uk>, <www-html@w3.org>
Message-ID: <000801c144eb$c32a09c0$928f9b3e@andromeda>
Hello,

it must be <body onload="..."/>, all element and attribute names in XHTML
are lower case, and since XHTML is based on XML, XHTML is case sensitive,
yes.
"onload" is just the XHTML attribute name, it is entirely out of scope of
ECMAScript (sometimes referred to as "JavaScript"). It has nothing to do
with ECMAScript and could also be used for VBScript, Perl, Java, perhaps
SMIL or whatever the client of your desire supports for event handling.
Forget Netscape's "documentation". Netscape's "documentation" is inofficial
and it describes HTML previous to XHTML as interpreted by Netscape
Communicator, so it is case insensitive and refers to Netscape's
implementation of HTML only.
The official documentation of HTML can only be found at the IETF / RFCs
(HTML previous to 3.2), W3C (HTML 3.2, 4.0, 4.01, XHTML 1.0, 1.1, XHTML
Basic 1.0, XHTML Modularization) and ISO (ISO-HTML).

Greetings

Christian Hujer


-----Original Message-----
From: www-html-request@w3.org [mailto:www-html-request@w3.org]On Behalf Of
Brian Fletcher
Sent: Thursday, September 20, 2001 2:58 AM
To: www-html@w3.org
Subject: onLoad


I recently converted a page to xhtml, I inserted the xhtml transitional DTD,
sent it to the validator and it failed, Why? because I had a javascript
event handler ( onLoad) in the body tag.
Now I asked around and was told that it is because xhtml is case sensitive
the onLoad event handler should be onload, i.e. lowercase l.
I argued this isn't correct because the event handler is a javascript event
handler, and it should be formatted with the uppercase L because js is case
sensitive as well.
So we now got the HTML coders who say the tag is theirs and should be their
way, and the scripters who say the opposite.
Does anyone know who is correct here?
I have read back and according to Netscape's documentation, it should be
onLoad, but in HTML 4.01 it is onload.
I know it sounds trivial, but try telling that to the W3C XHTML validator
Received on Monday, 24 September 2001 07:26:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:49 GMT