GlideDialogWindow HTML Via Variable

stevejarman
Giga Guru

I'm creating a custom dialog, essentially following this article:

Displaying a Custom Dialog - ServiceNow Wiki

What I need to be able to do though, is pass some HTML code in via a variable and then display it, not as a string (e.g. <h1>Test</h1>) but as interpreted HTML.

So I might have this UI Page defined:

<g:ui_form>

      <g:evaluate var="jvar_base_html"

      expression="RP.getWindowProperties().get('base_html')" />

      ${jvar_base_html}

</g:ui_form>

I pass in "<h1>Test</h1>" as "base_html", and I want it to display "Test", rather than the string.

Hope that makes sense...

Is this possible?

10 REPLIES 10

Thanks Mike, but the whole point is that I want to be able to generate the HTML in the script and then pass it to the UI Page. Got this sorted out though with the workaround previously shown.