Applying parameters and actions to an existing TM1 Web object
After a Cognos® TM1® Web object is displayed in your
web page, you can then use parameters to apply more actions to that
specific object by updating the URL for the object.
To apply more actions to a Websheet or CubeViewer object that is already displayed, create a new URL with the parameters that you want. Then, apply the new URL to the src (source) property of the iframe where the object is displayed.
If the object is already displayed in an iframe, then you need to append only the action parameters to the base URL to create the new URL.
For example, the following URLs append the AutoRecalc and HideDimensionBar parameters to the base URL.
http://localhost:9510/tm1web/UrlApi.jsp#AutoRecalc=true
http://localhost:9510/tm1web/UrlApi.jsp#HideDimensionBar=true
Example
The following example shows a JavaScript function that applies
an updated URL to the src property of an iframe that
is already displaying a CubeViewer object.
<!-- Use this iframe to display the CubeViewer (code not shown) -->
<iframe id="cubeviewId"></iframe>
<script type="text/javascript">
// This function updates an existing CubeViewer object
function toggleDimensionBar() {
// Get a reference to the existing iframe and CubeViewer
cubeView = document.getElementById("cubeviewId");
// Create an updated URL and apply it to the iframe
baseUrl = "http://localhost:9510/tm1web/UrlApi.jsp";
cubeView.src = baseUrl + "#HideDimensionBar=True";
};
</script>