I am using the jQuery select2 plugin and trying to get AJAX to work with my ext data that obviously doesn't work, and I'm just wondering if anyone can tell me what I'm doing wrong or something is missing?
NOTE. It is only for selection v3.5.2
my js:
$('#cliselect').select2({ ajax: { dataType: "json", url: "clientprojectpopulate.php", results: function (data) { return {results: data}; } } });
HTML:
<select id="cliselect" name="cliselect" style="width: 100%;" /></select>
my JSON is returned (which I believe is really):
[{"id":"62","text":"Alberta Innovates Health Solutions"},{"id":"4","text":"Alterna Savins & Credit Union"},{"id":"63","text":"BC Patient Safety & Quality Council"}]
javascript jquery ajax jquery-select2
rubberchicken
source share