Difference between revisions of "HTML Presentation Object: Show Measure Values"
Jump to navigation
Jump to search
(Created page with "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...") |
m (Ollvihe moved page HTML Presentation Object: Show Measure Values using to HTML Presentation Object: Show Measure Values without leaving a redirect) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 27: | Line 27: | ||
</script> | </script> | ||
</pre> | </pre> | ||
+ | |||
+ | [[Category: QPR UI]] |
Latest revision as of 16:49, 6 February 2018
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>