Skip to content

pass javascript value to Stash variable #182

@fenster12

Description

@fenster12

I am wanting to pass a JS value to a Stash variable but the following didn't work. Is this possble?

<script> var w = window.innerWidth; var x = document.getElementById("demo"); x.innerHTML = w ; </script>

{exp:stash:set name="foo" id="demo"}{/exp:stash:set}

{exp:stash:get name="foo"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions