Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hi to all

Simple question:
inside a backend template, if I have a variable set by javascript like
<script>
let x = 5;
let y = 6;
let z = x + y;
</script>

How can I pass this 'z' value result to couchCMS?

I'm trying to use pure javascript to do some calculations, and communicate
1/ CouchCMS variable values to javascript,
2/ and return javascript result to CouchCMS


Are there some examples out there for those 2 topics?
Ok, just realize that my question could be confusing as javascript is supposed to run client side :)

But as I'm running node.js with php, I have both running server side

by the way, find out another way to do it with javascript workers and couchCMS

thanks
2 posts Page 1 of 1