Possible Duplicate:
Populating child dropdownlists in JSP/Servlet
JSP: drop down list 2 depends on drop down list 1
Hello am developing a web app in JSP..i have two drop down list in which value selected in first ddl will be used to show values in other drop down list.all values are fetched from db.(Access). How can i do that ? can anyone give me java script code ?
For e.g.If i have Mumbai & Delhi in one DDL,then if i select Mumbai in 2nd drop down list flats in Mumbai shud get displayed
<select name="ddlArea">
<% try{
while(rs.next())
{
%> <option><%=rs.getString("Area_Name") %> </option>
<% }}catch(Exception e){System.out.println(e.getMessage());}%>
</select>
</td>
<th width="20%">Select Flat: </th>
<td width="30%"><select name="ddlFlat">
<option>A-201</option></select>
Now depend on Area_Name Next Drop down list shud get filled...