How would I go about inserting line breaks in the value of hidden fields?
For ex. this is how my hidden field looks like:
<input type="hidden" name="dahidden" value="<%=da.getFname() %> <%=da.getLname() %> <%=da.getEmail() %> <%=da.getPhone() %> <%=da.getExt() %>">
I tried the following:
value="<%=da.getFname() %> <%=da.getLname() %> \n <%=da.getEmail() %> ..."
value="<%=da.getFname() %> <%=da.getLname() %> '\n' <%=da.getEmail() %>..."
value="<%=da.getFname() %> <%=da.getLname() %> <br> <%=da.getEmail() %>..."
But all of them don't actually resolve to the newline character, and get displayed as \\n, '\\n', and
respectively.
Thanks,
Pritish
Just insert them plain.
<input type="hidden" value="<%=da.getFname() %>
<%=da.getLname() %>
<%=da.getEmail() %>">
That said, have you considered taglibs/EL? Scriptlets are discrouaged since a decade. If you've learnt them from some book/tutorial, I think it's high time to replace it by a more decent/recent one to avoid future troubles.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.