add this before ajax post
$('#myDropDown').empty();
$('#myDropDown').append($('<option></option>').html('Loading...'));
then again with the successful dynamic addition of the dropdown menu
$('#myDropDown').empty();
$('#myDropDown').append($('<option></option>').val("").html("Select"));
for (var i = 0; i < array.length; i++) {
$('#myDropDown').append($('<option></option>').val(array[i].selectedvalue).html(array[i].selectedtext));
}
source
share