have the code to get the items based on the AD groups. HTML & PHP. value results = 5. from 2 to 4 items in the drop-down list and it could be different What I'm trying to do is select a button which could have an id value of "item-X" where X is the number of entries to populate so it could be different based on whatever button I click. /><P N='AllowMinimize' T='False' The results are given to us as a JSON object that we can then loop through and insert into a dropdown runtime. list filled with bogus items, that I would need to replace with actual The above code has been tested in the following browsers. , $( if you want to populate with new option don't use appendTo(). In real-time web applications, sometimes we are required to create a dropdown combo box (select-option-html) dynamically which means the options will be loaded at run time for that dropdown list. "; $("#FacilList").append(str); Could any one help me out on how to populate a dropdown based on Another dropdown selection. Only for the continent dropdown list the list of continents will be generated through the PHP code on page load or page refresh. , Re: Re: Dynamically populate dropdown list with jquery, , jQuery(document).ready( How do I create a drop down list in HTML? How do I make a horizontal table in Excel? By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Provide the permalink of a topic that is related to this topic, , , , . In this tutorial we will create a How to Populate Dropdown Select Option using jQuery. $("input[id$='SpListFilterWebPart']").text(''); SpListFilterWebPart, then sets A solution is to create your own jquery plugin that take the json map and populate the select with it. Why is water leaking from this hole under the sink? To add a dropdown list dynamically, you would need to create the HTML