How to create a chained select with Lasso, jQuery and JSON

Modified on September 13, 2014.

Have jQuery do a MySQL search to fill a select pulldown based on the option chosen in another select.

Steps

  • Once you select a city from the first select, the state and zip code fields automatically fill in, and in the second select see a list of organizations for the selected city + state.

Detailed explanations are in the comments.

You can run the demo.

And download the code.

Watch Using Firebug to Check a jQuery Autocomplete Search to see how I use the Firebug plugin for FireFox to see the jQuery search results in their raw form – the first place to look if there are any problems.