How to modify page variable through Javascript?

Hi,

I have the following variable:

<dmx-value id="pageLoaded" dmx-bind:value="0"></dmx-value>

I need to set that to 1 from Javascript code, such as:

<script>
// Do something here
pageLoaded = 1;
</script>

I’ve tried doing stuff like:

dmx.parse('pageLoaded')
dmx.parse('pageLoaded.value')

But it doesn’t give me the contents of the variable, it returns undefined

What am I missing?

Community Page
Last updated: