Skip to main content
OutSystems

How to load CSS in an Ajax Request

Question

How to load CSS for a popup that opens in an AJAX request?

I can't dynamically assign to the StyleSheet property of pages or web blocks.

Answer

Use an unescaped expression to add the style sheet, but only when needed for a popup.

Inline image 1

Inline image 2

Use the sample eSpace below to explore the solution in your environment.

https://success.outsystems.com/@api/deki/files/58/TestStylesheet.oml

  • Was this article helpful?