|
I cannot find any information on how to access a database in javascript. I have a form field of offices. Depending on what office they pick I have another drop-down that will populate with the members of that office.
How do I do this? I know it is an onchange event, but beyond that I don`t know.
Thanks
moon
|
|
|
|
|
u can create a bean and access its values from your page...something like this....
<bean:define id ="EOR" name = "FormBean" property="EOR" />
<select>
<option value=`All` selected = `true`>All</option>
<%
try{
options = (String[][])EOR;
val= java.lang.Integer.valueOf(options[0][0]).intValue();
if(val>0){
for(i = 1; i<=val; i++)
{out.print("<option value=`" +options[0] + "`>" + options + "</option>");}}}
catch(Exception e){System.out.println("Error in EOR in Query.jsp--->"+e);}
%>
</select>
|
|
|