Skip to main content
RSS feed Subscribe to feed


Installing and Configuring the JavaScript API

Before the Web Player JavaScript API can be used to create mashups, the Web Player must be installed and configured to enable the JavaScript API.


The following instructions define the setting up of the development environment only.
For the setup of the production environment, refer to the TIBCO® Spotfire® Web Player - Installation Manual.

Windows Vista Prerequisites for the Development Machine.

  • Windows Vista with at least the following features in IIS enabled:
    Install IIS on Windows Vista
    To access these settings, select Control Panel > Programs and Features > Turn Windows features on or off
  • Visual Studio® 2008, or Web Developer edition if Visual Studio® Express is used
  • Developer logged in as an administrator account. UAC off simplifies greatly.

Installing the Web Player

  1. Install the Spotfire Web Player on the development machine, as described in the TIBCO® Spotfire® Web Player 2.1 Installation Manual.
  2. Enable the Spotfire Web Player JavaScript API in the Web.config file. It is typically installed in the C:\Program Files\Tibco\Spotfire Web Player\[version]\webroot folder:
    Locate the configuration/spotfire.dxp.web/setup section, and add the following line: <javaScriptApi enabled="true" domain="" />
    If the Mashup page is located on another server than the one the Web Player is installed on, the domain property of the Mashup and the Web Player pages must be changed to match. If, for instance, the Mashup page is located on the machine and the Web Player is located, they both have to be changed to
    To do this, first change the domain attribute of the javaScriptApi section to Then add the line document.domain = ''; to the mashup example before the Web Player API is called.
    Note: This cannot be done with localhost, since qualified DNS names ( must be used at all times. The tutorial examples contain a commented line, document.domain=''; in the start of the first script block, where changes can be made.
    • Mashup Development with Multiple Servers
      JavaScript in mashup calls from the same server as the Web Player does not compromise domain security. If the mashup and the Web Player reside on different servers, attention to domain attributes is essential.

Running the Project

  1. Login to Windows as an administrator.
  2. Run Visual Studio® as an administrator.
    Right-click the Visual Studio® shortcut and select Run as administrator if UAC is enabled
  3. Select menu File > Open > Project/Solution..., navigate to the folder SDK\Examples\JavaScript\SpotfireDeveloper.WebAutomationExample and open the SpotfireDeveloper.WebAutomationExample.csproj project file.
  4. In the Solution Explorer right-click the Default.htm and select Set as Start Page.
  5. Open the local IIS and locate the localhost/SpotfireWebSdkExamples web application created by Visual Studio®.
  6. To enable debugging, make the following changes to the web site:
    1. Select Start > Control Panel > Administrative Tools > Internet Information Services (IIS) Manager
    2. Select <Machine>\Web Sites\SpotfireWebSdkExample web application.
      Configuring IIS in Vista
    3. In the Actions pane on the right hand side, click Basic Settings, and change application pool to Classic .NET AppPool.
    4. In the center pane, select Authentication,
      enable Window Authentication,
      disable Anonymous Authentication,
      and disable Forms Authentication if it is enabled. Configuring authentication in Vista
      Note: Forms Authentication can't be used with the mashups, because there is no login in the API for security reasons.
  7. Go back to Visual Studio®, and press F5 to run the project.