Search the FirstSpirit Knowledge Base
Hello,
Is there any possible way to set Java script variable to cms_set?
javascript variable value:
var metaTitle = Zentrale Telefon-Ansage an Mariä Himmelfahrt;
How to set the value to CMS tags assignment.???CMS_SET
Thanks
Hello,
I'm not sure what exactly you're trying to do. Do you want to
1. assign the value of a FirstSpirit variable to a JavaScript variable?
Or do you try to
2. assign the value of a JavaScript variable to a FirstSpirit variable?
The first can simply be done by something like:
$CMS_SET(set_fsVar, "myValue")$
<script>
var jsVar = "$CMS_VALUE(set_fsVar)$";
</script>
The second on the other hand is not possible since the generation of your site has already finished when your JavaScript code is executed.
I hope this will help.
Best regards
Tim
Hello,
I'm not sure what exactly you're trying to do. Do you want to
1. assign the value of a FirstSpirit variable to a JavaScript variable?
Or do you try to
2. assign the value of a JavaScript variable to a FirstSpirit variable?
The first can simply be done by something like:
$CMS_SET(set_fsVar, "myValue")$
<script>
var jsVar = "$CMS_VALUE(set_fsVar)$";
</script>
The second on the other hand is not possible since the generation of your site has already finished when your JavaScript code is executed.
I hope this will help.
Best regards
Tim
Hello Mr. Tim Gremplewski,
Thanks for your kind reply.ya it is not possible.