Required HTML <head> and <body> tags to use the JavaScript library
The HTML <head> and <body> sections in each custom web page that uses the Cognos® TM1® JavaScript library must include a set of required tags and references.
Add the following references to any of your HTML documents that use the JavaScript library.
- Add the meta, link, and script references to the <head> section.
- Add the class reference to the <body> section.
These references point to files contained under the Cognos TM1 Web installation directory.
TM1_Installation_Location\webapps\tm1web\...
If your Cognos TM1 Web server and custom web pages are not on the same domain, use the cross-domain example to specify complete URL addresses that point to the required references.
Example
If your TM1 Web server and your custom web pages are all on the same domain, use the following tags and references.<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8,9">
<link href="scripts/dojo/resources/dojo.css"
rel="stylesheet" type="text/css" />
<link href="scripts/dijit/themes/claro/claro.css"
rel="stylesheet" type="text/css" />
<link href="css/cubeviewer.css" rel="stylesheet" type="text/css" />
<link href="css/websheeter.css" rel="stylesheet" type="text/css" />
<link href="scripts/tm1web/themes/tm1web/tm1web.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript"
src="scripts/tm1web/common/DjConfig.js"></script>
<script language="javascript"
src="scripts/dojo/dojo.js" type="text/javascript"></script>
</head>
<body class="claro tm1web">
</body>
Cross-domain example
If you need cross domain to access TM1 Web, use the following tags and references. Change the host and port values for your specific environment.<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8,9">
<link href="http://host:port/tm1web/css/cubeviewer.css"
rel="stylesheet" type="text/css" />
<link href="http://host:port/tm1web/css/websheeter.css"
rel="stylesheet" type="text/css" />
<link href="http://host:port/tm1web/scripts/tm1web/themes/tm1web/tm1web.css"
rel="stylesheet" type="text/css" />
<link href="http://host:port/tm1web/scripts/dijit/themes/claro/claro.css"
rel="stylesheet" type="text/css" />
<link href="http://host:port/tm1web/scripts/dojo/resources/dojo.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript"
src="http://host:port/tm1web/scripts/tm1web/common/DjConfig.js"></script>
<script language="javascript" src="http://host:port/tm1web/scripts/dojo/dojo.js"
type="text/javascript"></script>
</head>
<body class="claro tm1web">
</body>