I have 4 arraylist in jsp and I want to get elements of lists from javascript function.
it looks like there is no problem getting one element from jsp arraylist.
But I don't know how to move multiple or all elements from jsp arraylist to javascript code.
below is my code
<script>
function makeTable(){
for(c=0;c<row_num;c++){
row[c]=document.createElement('tr');
for(k=0;k<cell_num;k++) {
cell[k]=document.createElement('td');
cont = document.createElement('a');
cont.href="./bbs_view.jsp?count=" + c;
cont.innerHTML ="<%=title.get(0)%>";
cell[k].appendChild(cont);
row[c].appendChild(cell[0]);
}
}
}
</script>
as you can see, above function can get only one element from jsp arraylist.
is there any way to replace <%=title.get(0)%> to
something like <%=title.get( javascript var c)%>?