Skip to content

Instantly share code, notes, and snippets.

@grgaortiz
Created November 3, 2015 21:35
Show Gist options
  • Save grgaortiz/69a39793c275cf87962e to your computer and use it in GitHub Desktop.
Save grgaortiz/69a39793c275cf87962e to your computer and use it in GitHub Desktop.
<?php
setcookie('sptfrUser', 'eqc\gortiz');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>API Scenario</title>
<script type="text/javascript"
src="//spotfire.datariver.me:8443/SpotfireWeb/GetJavaScriptApi.ashx?Version=4.0"></script>
<script type="text/javascript">
document.domain = 'datariver.me';
window.onload = function () {
var customization = new spotfire.webPlayer.Customization();
customization.showTopHeader = false;
customization.showToolBar = false;
var app = new spotfire.webPlayer.Application("//spotfire.datariver.me:8443/SpotfireWeb/", customization);
// Register an error handler to catch errors.
app.onError(errorCallback);
// Register event handler for document opened event.
app.onOpened(onOpenedCallback);
// Register event handler for document closed event.
app.onClosed(onDocumentClosedCallback);
// Open an analysis.
app.open(
"/0481/cb_0481_01_DWP Dashboard2",
"webPlayer",
'');
};
function errorCallback(errorCode, description) {
// Displays an error message if something goes wrong in the Web Player.
alert(errorCode + ": " + description);
}
function onOpenedCallback(analysisDocument) {
// Document is now opened and ready for interactions.
}
function onDocumentClosedCallback(analysisPath) {
// Document is now closed.
}
</script>
</head>
<body>
<div id="webPlayer" style="width: 800px; height: 600px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment