Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!

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