function init() {
var arr = new array();
<%
String[] piatti = request.getParameterValues("piatti"); //<---debugging "piatti" has 3 values
if (piatti != null) {
for (int i=0; i<piatti.length; i++) { //<--- this for is actually done 3 times
%>
arr[<%=i%>] = <%=piatti[i]%>;
alert("ciao") //<--- even if debug pass from this one, i have no alert window :(
<% }
} %>
var j = 0;
for (j=0; j<arr.length; j++) { //<--- this for is done only 1 time
if (document.ins_risto.piatti.options[j].value == arr[j]) {
document.ins_risto.piatti.options[j].selected = true;
}
}
}