I wrote this little function to fill a drop down list with data from the server.
function fillDropDown(url, dropdown) { $.ajax({ url: url,