Connecting Tech Pros Worldwide Forums | Help | Site Map

"language=javascript" deprecated

drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,577
#1: May 16 '07
When I visit this board, I see this frequently:
Expand|Select|Wrap|Line Numbers
  1. <script language=javascript>
but "language=javascript" was deprecated in 1996. So, why do people still use it? It doesn't do anything.

Familiar Sight
 
Join Date: Feb 2007
Posts: 207
#2: May 16 '07

re: "language=javascript" deprecated


Quote:

Originally Posted by drhowarddrfine

When I visit this board, I see this frequently:

Expand|Select|Wrap|Line Numbers
  1. <script language=javascript>
but "language=javascript" was deprecated in 1996. So, why do people still use it? It doesn't do anything.

Because they don't know any better, they (or their teachers) are just copying outdated examples.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#3: May 16 '07

re: "language=javascript" deprecated


Yes, people just copy code. We have this same problem with document.all and document.layers and other forms of outdated browser detection techniques.

Instead of language=javascript, use type="text/javascript", see link (for the benefit of anyone who doesn't know)
Reply