Forum Moderators: open

Message Too Old, No Replies

Drop Down Box with AJAX and Classic ASP

Need help populating county from state

         

raf311

10:58 pm on Oct 3, 2007 (gmt 0)

10+ Year Member



I have a table that contains an id column, state column and county column like so:

1 ¦ Alabama ¦ Clay
2 ¦ Alabama ¦ Randolph
etc...

My page has 2 drop down boxes - State and County.

The State Drop Down already contains the states.

I want to use AJAX (in conjunction with classic ASP) to return and populate the counties of a particular state in the County drop down.

Any pointers on how I may accomplish this?

Thanks!

eelixduppy

12:49 am on Oct 4, 2007 (gmt 0)



Hello,

I wrote something similar in the PHP forum. Although not ASP, the javascript should be similar to what you are looking for: [webmasterworld.com...]

good luck :)

XtendScott

3:37 am on Oct 4, 2007 (gmt 0)

10+ Year Member



raf311,
The example by eelixduppy is an excellent start. If you need help converting for ASP let me know. But the Javascript is a classic AJAX call.

raf311

12:13 pm on Oct 4, 2007 (gmt 0)

10+ Year Member



Thanks! Do you know if the JS works in IE6+, Firefox and Opera?

raf311

12:59 pm on Oct 4, 2007 (gmt 0)

10+ Year Member



It works in all browsers! Thanks guys for all of your help!