Filling a select drop-down with ajax data using jQuery
In user interfaces, it’s sometimes the case, that you need to have dropdowns with content dynamically loaded from a database, and sure you can query the database and place the content in the HTML-source as regular markup, but you can also write a few lines of jQuery powered javascript, and provide the data from an ajax-source.
Here’s how to do it.
First make the drop-down and as the single option make a “loading” message - just to let the user know something is happening.