Link to home
Start Free TrialLog in
Avatar of USCBigRed
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.Fields.Item("State").Value)%>" <%If (Not isNull((Recordset1.Fields.Item("State").Value))) Then If (CStr(Recordset3.Fields.Item("State").Value) = CStr((Recordset1.Fields.Item("State").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(Recordset3.Fields.Item("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.Fields.Item("County").Value)%>" <%If (Not isNull((Recordset1.Fields.Item("County").Value))) Then If (CStr(Recordset4.Fields.Item("County").Value) = CStr((Recordset1.Fields.Item("County").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(Recordset4.Fields.Item("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
ASKER CERTIFIED SOLUTION
Avatar of Rouchie
Rouchie
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial