Here's my problem:
I have a one-dimensional array that is a result of some server side code in the same .asp. I want to take this array and transfer the strings in it to a javascript array, so I can use the values in a table for displaying purposes.
This is the code I have tried:
<script language="javascript">
var jsArray = [];
var n = <%=r%>;
for (n = 0; n < 4; n++){
jsArray[n] = '<%=tulemused(n)%>'; //this isn't working for some reason
}
</script>
I personally think the error is created by the n variable. It is displayed correctly when I write it in a paragraph, but it doesn't work when used in the line marked above. I have also considered that the for loop could be the problem.
What am I doing wrong?