Attribute for <INPUT ...>
LANGUAGE = "JavaScript" | "JavaScript1.1" | "JSCRIPT" | "VBScript" | "VBS" | other language

Usage Recommendation
Use it, but understand some of the strange problems associated with this attribute.

<INPUT LANGUAGE="..."> describes the scripting language (e.g. JavaScript or VBScript) to use for scripting events which take place in this input. The idea behind this attribute is the same as <SCRIPT LANGUAGE="...">: it designates which scripting language is being used. If the browser doesn't recognize the language, it shouldn't try to run the scripts in such events as onClick or onChange. Unfortunately Netscape ignores <INPUT LANGUAGE="...">, and so attempts to run the event scripts. If the scripts are written in VBScript, you get errors. We suggest you only use VBScript in forms where only MSIE users will use the page, such as in a company intranet.

Even if you are using MSIE only, this attribute has anomalies. If you use <SCRIPT LANGUAGE=VBSCRIPT>, any <INPUT ...> element afterwards is assumed to also use VBScript. If you wish to use JavaScript, you must explicitly add the attribute "JavaScript". We suggest that this situation shouldn't arise anyway. Although technically allowed, mixing scripting languages on a single page falls in the category of bad form. Use either all JavaScript or all VBScript. If you use VBScript, use "VBScript" in every <INPUT ...> tag. Even if MSIE assumes you are using VBScript, it's better not to rely on that sort of faulty behavior.

See also <SELECT LANGUAGE="..."> and <TEXTAREA LANGUAGE="..."> (which has even more problems).

About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.