@CharlesOct 06.2003 — #[i]Originally posted by James L. [/i]
[B]Hey Jona,
When I looked at the code I thought the "focus" should be lower case too, but shouldn't the "onload" still be "onLoad"? [/B][/QUOTE][font=georgia]The actual name of the handler is [font=monospace]onload[/font]. In fact, in HTML and XHTML all element names are in lower case, it's just that HTML is case insensitive. XHTML and JavaScript are case sensitive and will not recognize [font=monospace]onLoad[/font].[/font]
Thanks. So, the reason I have been using "onLoad" instead of "onload", with succcess, is because I started coding in HTML transitional, then switched to HTML strict, but still haven't gone to XHTML yet?
@CharlesOct 06.2003 — #[i]Originally posted by James L. [/i]
[B]Hey Charles,
Thanks. So, the reason I have been using "onLoad" instead of "onload", with succcess, is because I started coding in HTML transitional, then switched to HTML strict, but still haven't gone to XHTML yet? [/B][/QUOTE][font=georgia]That, and you have never tried to address the handlers directly from JavaScript.[/font]
@JonaOct 07.2003 — #[font=arial][color=maroon]Perhaps I can shed a little more light on the subject here. James, when Charles says "address the handlers directly from JavaScript" he means running it from JavaScript rather than an attribute of the BODY tag:[/color][/font]
[font=monospace]
document.onload=function(){alert("I am cool!")};
[/font]
[font=arial][color=maroon]You'd use the above instead of the case insensetive attribute: onLoad="alert('I am cool!');". You could use OnLoAd and get the same effect; however, if using document.OnLoAd you will get an error saying that OnLoAd is null or not an object (I believe that is the error). So, in XHTML, you'd have to use onload, and it is a good practice to use onload in HTML (strict or transitional doctype) rather than onLoad for when you port over to XHTML, as you will need to do eventually as it is the latest version of HTML and will be the new standard soon.[/color][/font]
@pyroOct 07.2003 — #[i]Originally posted by Jona [/i]
[B]...for when you port over to XHTML, as you will need to do eventually as it is the latest version of HTML and will be the new standard soon.[/B][/QUOTE]It already is the new standard...