Re: onLoad

Hallo Brian,

Thursday, September 20, 2001, 2:58:22 AM, you wrote:

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

No, there is no conflict. The onload-Attribute is part of (X)HTML.
This attribute just has the special meaning that its _value_ can be a
javascript-expression. So the way you are writing this attribute is
entirely out of the scope of javascript. BTW, the onload-handler in
Javascript is lower case, too, but this is off topic here.


-- 
Andreas Mäbert
Entwicklung & Programmierung
triplex - agentur für neue medien GmbH
Herzog-Heinrich-Str. 11-13 80336 München

Received on Monday, 24 September 2001 06:52:39 UTC