asp.net - Populate a DropDownList with AJAX -


i have long list of items dropdownlist. list long, show items in list if user clicks on dropdownlist expand it. found various tutorials on how use ajax cascading dropdownlists none explaining if possible have 1 dropdownlist gets populated ajax when user expands it.

are there extenders coming ajax toolkit missed? best way of achieving this?

thanks, ben

what this:

have 1 empty item in list. when dropdownlist receives focus change 1 item loading or that. make ajax call want.

once completes unbind focus event dropdown don't reload on subsequent focus events.

seems wouldn't difficult this.

i'll see if can whip on jsfiddle if need help.

edit: way question extenders don't know that.

edit 2: try this:

$(document).ready(     function()     {        $("#theselect").bind("focus", function()                             {                                 $("option:first", this).html("loading...");                                 settimeout(ajaxsuccesscall, 2000);                             });     });  function ajaxsuccesscall(data) {     var select = $("#theselect");     select.unbind("focus");     select.children("option").remove(); } 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -