Customizer's Guide > Custom Applications > Specifying the JavaScript Interpreter Engine
  
Specifying the JavaScript Interpreter Engine
Both JavaScript and JScript files have a .js file extension. By default, Arbortext Editor and the Arbortext Publishing Engine interpret .js files as Rhino JavaScript files. You should specify the JavaScript interpreter for a JavaScript or JScript .js file. This is especially important if you have .js files of both types.
We recommend adding a comment line to your script that specifies either the Rhino JavaScript engine (the default) or the Microsoft JScript engine as shown in the following examples. The first line of your .js file must be a comment starting with //.
To specify the Rhino JavaScript interpreter:
// type="text/javascript"
To specify the Microsoft JScript interpreter:
// type="application/jscript"
The specification can be enclosed in a script tag. Both of the following examples are a valid specification for JScript:
// <script type="application/jscript">
// type="application/jscript"
You can also specify the JavaScript interpreter using the ACL set javascriptinterpreter command. You can specify it in an ACL file placed in the Arbortext-path\custom\init directory, where it will be processed at startup. For information on setting the interpreter using ACL, see the online help topic for set javascriptinterpreter.