HTML Presentation Object: Show Measure Values
Revision as of 16:49, 6 February 2018 by Ollvihe (talk | contribs) (Ollvihe moved page HTML Presentation Object: Show Measure Values using to HTML Presentation Object: Show Measure Values without leaving a redirect)
This is an example is a simple customized presentation object which shows a value from a context variable measureValue. If the context variable value is changed, the new value is updated to the HTML presentation object.
<div id="content_<#uniqueId>"><div>
<style>
#content_<#uniqueId> {
font-size: 20px;
font-weight: bold;
}
</style>
<script>
function <#contextChangeFunction>(changedContextVariables) {
if (changedContextVariables["measureValue"] != null) {
$("#content_<#uniqueId>").text(changedContextVariables["measureValue"]);
}
}
function <#resizeFunction>(newWidth, newHeight) {
if (newWidth < 100) {
$("#content_<#uniqueId>").css("margin-left", "0px");
} else {
$("#content_<#uniqueId>").css("margin-left", "20px");
}
}
</script>