Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Changing the Scripting Language


Sun ONE Active Server Pages provides script interpreters to process the commands in an ASP script. Sun ONE ASP includes the Sun scripting engines, Sun ONE ASP VBScript and Sun ONE ASP JavaScript, which provide functionality equivalent to version 5.5 of Microsoft VBScript and JScript (see Scripting Languages Reference for more information about the scripting engines).

The default scripting language is VBScript, but you can change this to JavaScript for an ASP page by using the @LANGUAGE directive at the beginning of your ASP file, as described in Using @Directives.

You can change the scripting language for a single block of script by enclosing the block in <SCRIPT> ... </SCRIPT> tags. Normally, a block of code enclosed in <SCRIPT> tags runs on the client side, but you can force the block to run on the server by including the runat=server attribute, as shown in the following example:

<SCRIPT language=JavaScript runat=server>

Alternatively, your system administrator can change the default scripting language to either VBScript or JavaScript on the ASP Server. For Windows systems, see Editing the Windows Registry. For UNIX and Linux systems, see Editing the Sun ONE ASP Configuration File.

See also:

Adding Scripts



ContentsPreviousNextIndex