---
title: StylesheetScriptsEnabled System Parameter – Browser Scripts in Nodinite Stylesheets
description: "The StylesheetScriptsEnabled System Parameter decides whether a Nodinite Stylesheet's own browser script runs where its output is shown: script tags, event handlers and javascript: links, in XSLT and Liquid. Scripts run isolated from the Web Client; msxsl:script never runs."
---

# StylesheetScriptsEnabled - System Parameter

**StylesheetScriptsEnabled** decides whether a [Stylesheet's][What is a Stylesheet] own browser script runs where the [Web Client][] shows its output: script tags, event handlers such as `onerror` and `onclick`, and `javascript:` links, in XSLT and Liquid alike, also when they come from the logged message.

## :fa-table: At a Glance {#at-a-glance}

| Property | Value |
| --- | --- |
| Key | `StylesheetScriptsEnabled` |
| Data type | boolean |
| Default | `false` (scripts don't run) on a new installation; an upgrade keeps the current value |
| Read by | [Web Client][] only |
| Takes effect | Within about 45 seconds; no restart needed |
| Status | ✅ Active |
| Since | Nodinite 7 |

## :fa-gears: How It Works

![StylesheetScriptsEnabled set to false and saved; in a Log View the EDIFACT invoice formatted by the Line break an EDIFACT example stays empty; set to true and saved; formatted again, the invoice shows one segment per line, animated walkthrough (7.12)][Hero]  
*Animated walkthrough: with `false` the [Line break an EDIFACT][] Stylesheet loses its script, and the formatted invoice stays empty. With `true` the script runs, isolated from the Web Client, and the invoice shows one segment per line. The value was put back afterwards.*  

[Stylesheets][] format message bodies in [Log Views][]: the **View message body formatted as** dialog, the Stylesheet editor preview, and **Open in New Window**. :new7.12: That output always runs in a frame with an origin of its own. Its script, when allowed, can't read the Web Client's window, cookies, storage, or API answers. Charts, [Mermaid][] diagrams, forms, links that open new tabs, downloads, and **Print** keep working, and so do images from the [Image Library][] and icons.

| Value | Behaviour |
| --- | --- |
| `false` (default on a new installation) | ❌ No script from a Stylesheet runs: no script tags, no event handlers, no `javascript:` links. Mermaid diagrams still draw, because :Nodinite:'s own page scripts run. Chart.js charts don't, because they need the Stylesheet's own script. Liquid templates lose their script blocks before rendering, as always. |
| `true` | ✅ The Stylesheet's scripts run, isolated from the Web Client as described above. A script error inside a library such as Chart.js shows only as *Script error.*, without details. |

The [Logging Service][] and the [Monitoring Service][] don't read this parameter, and alert e-mails sent through [Alarm Plugins][] never run browser script.

The [Line break an EDIFACT][] and [Base64Decode XML from JSON][] examples contain JavaScript and need this parameter set to `true`.

>[!IMPORTANT]
>:new7.12: A new installation sets **StylesheetScriptsEnabled** to `false`. An upgrade keeps the value it already has, and installations before 7.12 were set up with `true`. After an upgrade, check the value, and set it to `false` unless a Stylesheet needs scripts.

### msxsl:script Never Runs {#msxsl-script}

`msxsl:script` blocks in XSLT Stylesheets never run in :Nodinite: 7, whatever the value of this parameter, because .NET can't compile them. A Stylesheet with an unused block works. A Stylesheet that calls a script function shows this message instead of the formatted body:

![The View message body formatted as dialog with the message that the Stylesheet calls an msxsl:script and scripts in XSLT Stylesheets can't run in Nodinite 7 (7.12)][1]  
*A Stylesheet that calls an `msxsl:script` function: use the built-in functions instead, or remove the script.*  

Rewrite such a Stylesheet with standard XSLT functions. For example, format a date with `substring` and `concat` instead of a C# `DateTime` script:

```xml
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <result>
      <formatted-date>
        <!-- 2026-11-09T15:43:22 becomes 2026-11-09 15:43:22 -->
        <xsl:value-of select="concat(substring(/data/timestamp, 1, 10), ' ', substring(/data/timestamp, 12, 8))"/>
      </formatted-date>
    </result>
  </xsl:template>
</xsl:stylesheet>
```

## :fa-lightbulb: Choosing a Value

* For security, keep the default `false` unless a Stylesheet really needs browser script, for example for Chart.js charts.
* Before you set it to `false`, review your [Stylesheets][] for scripts. Their output still shows, without the parts the scripts draw.
* Scripts run isolated, but they still run in the reader's browser. Review who is a member of the Administrator [Role][Roles], and review new Stylesheets before you use them.

## :fa-hand-point-right: Next Steps

* :fa-palette: [What is a Stylesheet][]  
* :fa-pen-to-square: [Add or manage Stylesheet][]  
* :fa-gears: [Manage System Parameters][]  

## :fa-link-horizontal: Related Topics

* :fa-palette: [Stylesheets][]  
* :fa-list: [Log Views][]  
* :fa-bell: [Alarm Plugins][]  
* :fa-users-cog: [Roles][]  
* :fa-globe: [Web Client][]  
* :fa-shield-halved: [ArticleSecurityPolicy][]  
* :fa-shield-halved: [HTTP Security Headers][]  
* :fa-cog: [System Parameters][]  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Customize/Stylesheets/XsltScriptNotSupported.png

[Add or manage Stylesheet]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/Add%20or%20manage%20Stylesheet.md
[Alarm Plugins]:{ndr}/Administration/5.%20Settings/1.%20Alarm%20Plugins/Overview.md
[ArticleSecurityPolicy]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/ArticleSecurityPolicy.md
[Base64Decode XML from JSON]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Base64Decode%20XML%20from%20JSON.md
[Hero]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Settings/SP/SystemParameters_StylesheetScripts.gif
[HTTP Security Headers]:{ndr}/Install%20and%20Update/Troubleshooting/IIS/Hardening/HTTP%20Security%20Headers.md
[Image Library]:{ndr}/Repository%20Model/Images/Features/What%20is%20the%20Image%20Library.md
[Line break an EDIFACT]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Examples/Line%20break%20an%20EDIFACT.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Overview.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Manage System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Manage%20System%20Parameters.md
[Mermaid]:{ndr}/Mapify/Features/Mermaid%20Rendering.md
[Monitoring Service]:{ndr}/Core%20Services/Monitoring%20Service/Overview.md
[Roles]:{ndr}/Administration/3.%20Access%20Management/1.%20Roles/Overview.md
[Stylesheets]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Overview.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md
[Web Client]:{ndr}/Core%20Services/Web%20Client/Overview.md
[What is a Stylesheet]:{ndr}/Administration/4.%20Customize/2.%20Stylesheets/Features/What%20is%20a%20Stylesheet.md