Accessing variable which has comma during String concatenation
I am using following code in my jsp.
<%= scriptletVar%> returns a string like 12,000.When value is hard coded
like 12,000 it displays it fine. But when this value comes as a scriptlet
variable. It would only print 12. A separate <tr> tag would be created
having value of 000.
I am finding it difficult to find how it works when hardcoded but not when
fetched dynamically. There is something wrong with value having comma in
it, but I am unable to figure a solution.
<script type="text/javascript">
$("#table tr:eq(1)").after("<tr><td class='row-highlight txt-ctr'>
<strong><span></span></strong></td>"+
"<td class='row-highlight
txt-right'><strong></strong></td><td class='row-highlight
txt-right'><strong>" +<%= scriptletVar%> +"</strong></td>"
+
//Rest of code
No comments:
Post a Comment