I have 3 dropdowns in my application. Based on the selections made in the
first two dropdowns, I need to pull out data from the database to set up the
corresponding menu for the third dropdown. How can I connect to the database
on the server after the first two dropdowns have been selected by the user
in order to be able to set up the third dropdown?
The first dropdown is states (8 in number for my application). The second is
counties (approx 80+ for each state). The data for the second dropdown is
calculated based on choice of the first dropdown. However since there are
only 8 states, i retrieve the data for 8 states and store it in arrays which
are then used for populating the second dropdown.
The problem is that now for the third dropdown there can be a very large
number of possible combinations of state and county. Retrieving this data
from the database beforehand might be overkill. I am looking at a dynamic
way to be able to retrieve this data on the fly. Is this possible at all?
Any hints/ideas would be appreciated...