0

I trying to a pass a jslt value to javascript but the value is not getting rendered.

<c:forEach items="${requestScope.P.Releases}" var="pr" varStatus="status">     <a href=javascript:popPR('${pr.url}') class="linkPR">
     <c:out value="${pr.title}" escapeXml='false' /></a>
<c:foreach>

if directly type the pr.url value the popup window gets opened but if i pass the through jstl it does not call the popup.

Can anyone please suggest how to fix it.

Thanks

1 Answer 1

1

Try using <c:out> to output the url :

<c:forEach items="${requestScope.P.Releases}" var="pr" varStatus="status">     
<a href=javascript:popPR('<c:out value="${pr.url}"/>') class="linkPR">
     <c:out value="${pr.title}" escapeXml='false' /></a>
<c:foreach>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.