Dynamic County List After State List


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>
If (Recordset3.CursorType > 0) Then
End If

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>
If (Recordset4.CursorType > 0) Then
End If

Please let me know what I need to add to make this work.
Thanks, Austin
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Doing this in ASP is going to be tricky if you're not confident with the language.  This is because you'd need to get the first drop down to post back the form to the server when a new selection was made in the list.  The server would then populate the second drop down list.  The problem is that you'd have to differentiate to the server whether the form has actually been completely filled in and submitted by the user, or whether the first list had just been changed.
If your county values are being pulled from a database, then you will probably have to use ASP to get the values.  However, I don't see this information changing very often (!), so I'd recommend using javascript to populate the list instead.  This also means you don't need to post back when a new state is chosen.

Macromedia's official tutorial on how to do this is here, http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14924

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.