- Posts: 17
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> var points=["{aScore}","{bScore}","{cScore}"]; points.sort(function(a,b){ return b - a }) document.write(points); </script>
Moonlight7 wrote: I guess the the problem is that EM {..} are being interpreted after the javascript function ended and I hope this can be solved some way or there is a simpler solution to what I need to achieve.
Thanks so much
var points=[{aScore}, {bScore}, {cScore}];
tpartner wrote: Try removing the quotes from the array elements so they're not interpreted as strings.
Code:var points=[{aScore}, {bScore}, {cScore}];