Expand my Community achievements bar.

Take 10 minutes to complete an Adobe Target review on Gartner Peer Insights, and as a thank you for your time, you’ll have the option to receive a $25 gift card!

Passing velocity variable to javascript

Avatar

Level 3

Hi All,

I am passing velocity variables like $e.name to JS and able to retrieve the same. But, I was also passing $entities to JS and was able to retrieve which all of a sudden is not working anymore. Could you please suggest what could be wrong in the below snippet and any alternatives?

 

#set($entitylist=$entities)
<script type="text/javascript">
var listofitems= "${entitylist}";

console.log(listofitems);

</script>

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies