USCBigRed
asked on
Dynamic County List After State List
Hi,
I have a form for user information. I have a simple "enter your address" form
I am going to post the two <input> value's that i'm having trouble with
I want the form to reload without posting any information to my database once the state has been chosen and then a list of counties in that state will appear in that list.
Any help would be great!!!
Here is my state Dynamic List
<select name="State">
<%
While (NOT Recordset3.EOF)
%><option value="<%=(Recordset3.Fiel ds.Item("S tate").Val ue)%>" <%If (Not isNull((Recordset1.Fields. Item("Stat e").Value) )) Then If (CStr(Recordset3.Fields.It em("State" ).Value) = CStr((Recordset1.Fields.It em("State" ).Value))) Then Response.Write("selected=" "selected" "") : Response.Write("")%> ><%=(Recordset3.Fields.Ite m("State") .Value)%>< /option>
<%
Recordset3.MoveNext()
Wend
If (Recordset3.CursorType > 0) Then
Recordset3.MoveFirst
Else
Recordset3.Requery
End If
%>
</select>
The state is working OK
and here is what I have for county so far.
<select name="County">
<%
While (NOT Recordset4.EOF)
%><option value="<%=(Recordset4.Fiel ds.Item("C ounty").Va lue)%>" <%If (Not isNull((Recordset1.Fields. Item("Coun ty").Value ))) Then If (CStr(Recordset4.Fields.It em("County ").Value) = CStr((Recordset1.Fields.It em("County ").Value)) ) Then Response.Write("selected=" "selected" "") : Response.Write("")%> ><%=(Recordset4.Fields.Ite m("County" ).Value)%> </option>
<%
Recordset4.MoveNext()
Wend
If (Recordset4.CursorType > 0) Then
Recordset4.MoveFirst
Else
Recordset4.Requery
End If
%>
</select>
Please let me know what I need to add to make this work.
Thanks, Austin
I have a form for user information. I have a simple "enter your address" form
I am going to post the two <input> value's that i'm having trouble with
I want the form to reload without posting any information to my database once the state has been chosen and then a list of counties in that state will appear in that list.
Any help would be great!!!
Here is my state Dynamic List
<select name="State">
<%
While (NOT Recordset3.EOF)
%><option value="<%=(Recordset3.Fiel
<%
Recordset3.MoveNext()
Wend
If (Recordset3.CursorType > 0) Then
Recordset3.MoveFirst
Else
Recordset3.Requery
End If
%>
</select>
The state is working OK
and here is what I have for county so far.
<select name="County">
<%
While (NOT Recordset4.EOF)
%><option value="<%=(Recordset4.Fiel
<%
Recordset4.MoveNext()
Wend
If (Recordset4.CursorType > 0) Then
Recordset4.MoveFirst
Else
Recordset4.Requery
End If
%>
</select>
Please let me know what I need to add to make this work.
Thanks, Austin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.