Hello World!
<installdir>\examples\insight\quick_start.zip
client_resources/hello-world.html
and
client_resources/js/hello-world.js
. You will also need a compiled model to drop into the app. You can copy the model from the
hello-world-example
example app as shown here:
<installdir>\examples\insight\developer_guide\javascript_api\hello_world_example\application.bim

<view-group>
section of the companion file:
<html-view title="Hello World Example" default="true"
path="hello-world.html"/>
The Hello World Example view is specified as the default view when one or more scenarios are selected. The view will be available in the Xpress Insight web client as a tab when the app is selected.
hello-world.js
and save it:
insight.ready(function () {
var view = insight.getView();
view.withFirstScenario()
.bindAutoText('#hellomessage');
view.start();
});
Notice that the JavaScript code is wrapped up in a call to insight.ready
. This ensures that your code will not be executed until the Xpress Insight API is fully initialized.
hello-world.html
file and saved:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initialscale=1.0">
<link type="text/css" rel="stylesheet" href="$distrib/insight-5.8.0.css"/>
<script src="$distrib/insight-5.8.0.js"></script>
<script src="js/hello-world.js"></script>
</head>
<body>
<p class="view-initializing">Initializing...</p>
<div class="view-initialized" style="display: none">
<h1>Hello, world! AutoText Example</h1>
<!-- start custom content -->
<h1 id="hellomessage" data-entity="MyScalar"></h1>
<!-- end custom content -->
</div>
</body>
</html>
The preceding code shows all of the HTML code required to include and initialize JavaScript API 5.8.0. It provides all the data, state, and view management needed to develop Xpress Insight applications.
The following sections describe these codes examples in more detail.
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.