MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
July
Sun Mon Tue Wed Thu Fri Sat
 
16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
2024
Months
JulAug Sep
Oct Nov Dec


Fri, Feb 24, 2012 4:10 pm

JavaScript Language Versus Type Attribute

After updating an old webpage, I validated the HTML on the page with the W3C Markup Validation Service. One of the errors reported for the page was the following one:

Error image - white x in red circle Line 19, Column 30: required attribute "TYPE" not specified

<script language="JavaScript">

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type= "text/javascript" for <script>.

In the head section of the HTML code, I had the following line:

<script language="JavaScript">

I didn't realize that the language attribute has been deprecated in favor of the type attribute. According to a posting I found at HTML Script tag: type or language?

The language attribute has been deprecated. Both will work in pretty much all browsers, but the first better adheres to modern standards.

The javascript code on the page was working as expected when I viewed the page with a browser, but I changed the line to the one below:

<script type="text/javascript">

[/network/web/browser/javascript] permanent link

Sun, Mar 01, 2009 9:37 pm

SoundManager 2

While looking for a method to associate sounds with links on a webpage for someone who wanted to have visitors to her website hear sounds of pages turning when they clicked on left and right arrows on the webpages, I came across SoundManager 2, which uses JavaScript and Flash to provide a method for playing sounds when someone clicks on an image, moves a mouse over it etc. The software was developed by Scott Schiller and is free.

[/network/web/browser/javascript] permanent link

Fri, Jan 20, 2006 8:03 pm

Internet Explorer JavaScript Support

JavaScript is often used to create dynamic webpages. However, when designing webpages you can't be certain that all users will visit your webpages with a browser capable of handling JavaScript code. Very old browsers or text-only browsers won't process the JavaScript code. Or an Internet Explorer user may have JavaScript support disabled. You can include code on a webpage to test whether JavaScript is supported and enabled.

[ More Info ]

[/network/web/browser/javascript] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo