Details on Insert JavaScript


This dialog allows you to add JavaScript to a text area. To reach it, click the Edit HTML button at the top of a text area (on the title bar), . In the opened Edit HTML dialog, click Insert JavaScript, .

Note: On the Community, the article Best Practices for Writing Custom JavaScript Code in Text Areas gives an introductory overview of how you can use JavaScript in text areas in Spotfire.  

Note: For security reasons, there are some restrictions for using scripts. For more information, see Usage of Scripts.

Option

Description

Available scripts

Lists all currently defined scripts.

Note: The Remark field can contain information about whether a script is trusted or not. Scripts that you have created yourself are trusted, and so are scripts saved as trusted to the library by a member in the Script Author group.

If you receive an analysis file containing a script directly from another person, the script will be listed as "Not trusted". This does not necessarily mean that the script contains any unsafe material, but you should determine whether you trust the script or not by inspecting it in the Edit Script dialog. By clicking OK in the Edit Script dialog, the script will be trusted. If you know all scripts are safe, you can click Trust All.

However, due to security reasons, scripts cannot be used in a TIBCO Cloud Spotfire web client environment. In a Spotfire on premises web client environment, scripts can be executed if they are saved as trusted by a member in the Script Author group. See also Usage of Scripts and Data Functions.

New

Opens the New Script dialog where you can define a new script.

Import

Opens a dialog where you can select an analysis file from which to import all available scripts.

Note: Spotfire compares the scripts you are trying to import with already existing scripts. A script whose script body is identical to an existing script will not be imported even if it has a different name.

Edit

Opens the Edit Script dialog where you can edit the selected script or its parameters.

Delete

Deletes the selected script.

Trust All

If you are sure all scripts are safe, click the Trust All button to trust them simultaneously.

Necessary input for the selected script

Lists all parameters that have been defined for the selected script. Click on a parameter to modify the input, see below. Different parameter types have different input settings.

Note: Only string literal parameter values are supported.

Input for the selected parameter

 

Value

Click this radio button if you want to type a string value to use as input for the selected parameter.

See also:

JavaScript Example Scripts

How to Use the Text Area

Using Scripts in the Text Area