how can i pass a vector(or array) from jsp to a javascript function?
Julio Lopez
Greenhorn
Joined: Nov 14, 2000
Posts: 28
posted
0
Just write the javascript array out using a loop. Assuming vector is referenced by v, <% int count = 0; %> var theArray = new Array(<%= v.size() %> ) <% for (Enumeration e = v.elements() ; e.hasMoreElements() { %> theArray[<%= count %>] = "<%= e.nextElement() %>" <% count++; } %> This should work. Julio Lopez M-Group Systems