select2 with ajax post method
问题 I am trying to use select2 with ajax loading. Here is my code: clonedTemplate.find('[id^=detailsPhaseFinanceMinor_]').select2({ placeholder: "Select", minimumInputLength: 1, ajax: { // instead of writing the function to execute the request we use Select2's convenient helper type: 'POST', contentType: "application/json; charset=utf-8", url: "mapBasic.aspx/GetFinSys", dataType: 'json', data: function (term, page) { return "{'term':\"" + term + "\"}"; }, results: function (data, page) { // parse