Hi I want to populate my second drop-down menu based off of the value selected on my first drop down. Is there a function or a way of doin g this...
P.S my code is in a JSP:
<%
Vector theStates = WeatherDAO.getWeatherStates();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<TR bgColor="#ffffff"><TD COLSPAN="2">
<TABLE CELLPADDING="3" CELLSPACING="2">
<TR><TD>
</FONT></CENTER><BR>
<BR>
<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="5" WIDTH="100%">
<TR BGCOLOR="#C0C0C0" ><TD COLSPAN="2" ALIGN="CENTER"> <FONT SIZE=+3><B> Weather Services</B></FONT>
</TD></TR>
</TABLE>
<HR SIZE="3" NOSHADE>
<font size=+1>Select the State and City for which you would like to receive weather information.</font><br>
<TR><TD>
<center>
<label for="weatherStat">State:</label>
<select name="weatherStat" id="States">
<% for (int i=0; i< theStates.size(); i++) { %>
<OPTION VALUE=<%=theStates%>> <%=theStates.elementAt(i)%> </OPTION>
<%
}
%>
</select>
>
</TD></TR>
</center>
<TR><TD>
<br>
<br>
<center>
<label for="weatherCity">City:</label>
<select name="weatherCity" id="Cities">
<%
Vector theCities = WeatherDAO.getWeatherCities();// <<this is wher I need to pass the selected value
%>
<OPTION VALUE= </OPTION>
<%
}
%>
</select></TD></TR>