I am working on a JavaScript page layout and trying to incorporate CMS helpers into it. Despite successful rendering, the helpers are not functioning as expected (resulting in "NaN" instead of the desired text). How can I integrate helpers into a JavaScript variable?
var detailsTemplate =
'<table cellspacing="0" cellpadding="0">' +
'<tr>' +
'<th class="info">' +
<%# CMS.GlobalHelper.ResHelper.GetString("ReceiptsList.ProductName") %> +
'</th>' +
'</tr>' +
'<tbody>' +
'{0}' +
'</tbody>' +
'</table>'