Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Formatting data elements
cjmaloof
I often use Javascript in a data element to output strings, for example if I want to display a score like<br />
48/50 (96%)<br />
in a table cell.<br />
<br />
Is there a way to do HTML formatting within this sort of element, e.g. to display<br />
<strong class='bbc'>48/50</strong> <span style='color: green'>(96%)</span><br />
instead? HTML tags seem to get escaped, and I haven't found a way to turn that off.
Find more posts tagged with
Comments
mwilliams
Hi cjmaloof,
Could you use a text element of type HTML instead of a data element? You should be able to do HTML tags inside one of these.
cjmaloof
Yup, dynamic text or text with <value-of format="HTML"> does the trick. (Though it makes me wonder what the difference between labels, text, dynamic text, and data really is -- maybe just the editor.) Thanks!