<pre lang="xml"><td> <select id="allocateToSelect" class="combo150"> </select> </td> I am inserting the DropDown option value as follows: <pre>function GetDisplayQCID() { debugger; $.ajax({ url: 'QCAllocation.aspx/GetDisplayQCID', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: "json", success: function (result) { debugger; if (result.d != '') { if (result.d != '' && result.d != null) { DisplayQCIDList = JSON.parse(result.d); var drawRow = function (qcIDs) { /*var dropdownQC = document.getElementById('qcSelect');*/ //for append to another DropDown. var dropdownQC = document.getElementById('allocateToSelect'); /*var dropdownAllocateToQC = document.getElementById('allocateToSelect'); dropdownAllocateToQC.innerHTML = dropdownAllocateToQC.innerHTML + dropdownQC.innerHTML;*/ var opt = document.createElement('option'); opt.innerHTML = ''; dropdownQC.appendChild(opt); for (var i = 0; i < qcIDs.length; i++) { opt = document.createElement('option'); opt.value = qcIDs[i].Id; // it will give the ID through which we can find the value which present in DropDown. opt.innerHTML = qcIDs[i].NetworkId; dropdownQC.appendChild(opt); } } drawRow(DisplayQCIDList); /*$('#qcSelect option').clone().appendTo('#allocateToSelect');*/ //for append to another DropDown. manageOverlay(false); } } }, error: function (error) { manageOverlay(false); alert(error.responseText); }, async: false }) };
&lt;pre lang=&quot;cs&quot;&gt;$(&amp;#39;#allocateToSelect&amp;#39;).change(function () { debugger; $(&amp;quot;#allocateToSelect option:selected&amp;quot;).val(); GetQCCount(); });&lt;/pre&gt;</pre></pre>
pre
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)