Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass javascript value to Stash variable #182

Open
fenster12 opened this issue Dec 1, 2023 · 0 comments
Open

pass javascript value to Stash variable #182

fenster12 opened this issue Dec 1, 2023 · 0 comments

Comments

@fenster12
Copy link

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"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant