Scripting languages

CSP pages support two scripting languages: JavaScript and VBScript. To indicate which language you will be using, the name of the language should be included at the top of each page. If this is not specified, it is assumed the language is VBScript.

UNIX:    Crystal Enterprise for UNIX only supports JavaScript. You must, however, still use the language tag.

Note:    JavaScript is based on the ECMA standard. On Windows, Crystal Enterprise uses the Microsoft Scripting Engine, which also supports non-standard features not specified by ECMA. On UNIX, Crystal Enterprise uses the Mozilla engine. The examples in this documentation will be written to adhere to the Mozilla standards (that is, they will not use non-standard features). They will, however, be portable between both platforms. There will also be some VBScript examples.

The following line indicates which language will be used:

<%@ Language = LanguageName%>

LanguageName may be one of the following
Value

VBScript

JavaScript

The percentage tags also indicate that the script will be evaluated on the server while the page is being processed. It is almost always preferable to process pages on the server side unless you need to provide real time interaction with the user. In order to include a script that is processed by the client browser, surround the script with the following tags:

<SCRIPT LANGUAGE="LanguageName">
</SCRIPT>

Because this script will run on the client browser, it will not have access to any of the server's resources. Note, also, that most browsers do not support VBScript. At the time of writing, only Microsoft Internet Explorer was able to run VBScript. For compatibility with most browsers, always write in JavaScript when using the <SCRIPT> tags.

Using helper_js.csp

There is a helper file that, in addition to other optimizations, compensates for many of the differences between Unix and Windows operating systems. It is important that you include this file in your JavaScript CSP pages and include a copy of the file in the same directory as your CSP file. Add the following line to a CSP page to include the helper file:

<!-- #include file=helper_js.csp -->

The helper file, helper_js.csp, is placed by default in \Program Files\Seagate Software\Enterprise\WebContent\Enterprise\eportfolio\en. Replace language with the information appropriate to your version of Crystal Enterprise: use en for English or ja for Japanese.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com