I want costom my tracking label in ACM delivery, and I see below article, but I'm not sure how can I add an extra script array of the delivery
I try to add the array ang got below pic error. how can I add the array articleList?
The solution is to:
Pre-load all the possible articles in an extra script array of the delivery - articleList[] - which means there must be a finite number of possible articles.
Write a JavaScript function at the beginning of the content.
<%@ value object='startScript' %>
function displayArticle(articleId)
{
<%@ foreach object="articleList" item="article" %>
if( articleId == <% value object="article" xpath="@id" %> )
{
<%@ value object='endScript' %>
<a href="http://nl.net?a.jsp?article=<%@ value object="article" xpath="@id" %>">article</a>
<%@ value object='startScript' %>
}
<%@ end @%>
}
<%@ value object='endScript' %>
Display the article by calling the function.
<%
for(var i=0; i<recipient.rcpArticle.length; i++ )
{
displayArticle(recipient.rcpArticle[i].article.@id)
}
%>