In my JSP page, I have following code to generate two arrays from database
<%
User user = (User)request.getSession().getAttribute("user");
String id = user.getSSN();
VerificationDAO verDAO = VerificationDAO.getInstance();
ArrayList list = verDAO.findAllSessions(id);
int size = list.size();
String[] sessionValues = new String[size];
sessionValues = (String[])list.toArray(sessionValues);
String[] sessionLabels = verDAO.formatSession(sessionValues);
%>
now I have a dropdown list, when user select one of the option, I want my javascript function to create another dropdown list by using those two arrays as values and lables. How can I pass those two arrays to the function.
Here is the code
<tr>
<td colspan="2" align="left">
<html:select property="selectedVerification" onchange="InsertBox(sessionValues,sessionLabels)">
<html
ption value="">--Please select a verification--</html
ption>
<html
ption value="0"> Scores Verification </html
ption>
<html
ption value="1"> Enrollment Verification </html
ption>
<html
ption value="2"> Semester GPA Verification</html
ption>
<html
ption value="3"> Degree Verification</html
ption>
</html:select>
<div id="theSpot"/>
</td>
</tr>
I got run time errors by doing this. please help!
[ December 12, 2003: Message edited by: Eric Pascarello ]