[thelist] XHTML and language="javascript"

Cake cake at brothercake.com
Wed Jun 18 18:08:00 CDT 2003


If you don't use a language attribute set to "javascript1.2" or later,
then array and object literals, regular expressions, and anonymous
functions will all create JS errors in netscape 2 and 3 - unavoidable
errors - it doesn't matter how you use them, the mere presence of the
syntax will trigger errors as you load.

But I personally consider it safe to assume that anyone who actually
uses those browsers, other than developers, does not have JS error
reporting enabled. Therefore I've abandonded the language attribute for
the sake of validity.




James

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Mike Combs
Sent: 18 June 2003 19:49
To: evolt mailing list
Subject: [thelist] XHTML and language="javascript"


I've been coding pages as closely to XHTML Strict as possible, but
holding 
back in a few places.  I wondered if it's time to take the plunge to 
complete compliance.

I've been declaring <script language="javascript" type="text/javascript"

src="myfile.js">.  I read somewhere that I should retain the language 
attribute for compatibility with older browsers, but now I can't
remember 
just which browsers I'm protecting here.  Should I drop the language 
attribute?  What browsers require the language attribute?

I'm on digest, so my reply to this thread will be a little slow, okay?

Thanks,
  ...mike

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

Evolt.org conference in London, July 25-27 2003.  Register today at
http://evolt.org.uk

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 




More information about the thelist mailing list