Q:

Show "Loading..." in dropdown box

I'm running a database query to load a dropdownbox using jquery. Is there a way to display the words "Loading..." in the dropdownbox while the query is running?
Thanks.

A:

You can add temporary item to your dropdown list while the ajax is running:
$('#myDropDown').prepend($('<option></option>').html('Loading...'));

A:

Let's call your drop down 'userChoice', you can write code like
$(document).ready(
    function()
    {

        //Before calling your ajax method, clear the select drop down.
        //and add a loading option.
        $('#userChoice')
            .children()
            .remove()
            .end()
            .append('<option value="">Loading...</option>');

        $.ajax(

                    //Load the userChoice as usual in success handler of your ajax call. 
                    success : function() { //Load #userChoice } 
              );

    }
);

