I'm using the jQuery select2 plugin and trying to get the AJAX to work with my ext data which is obviously not working and I'm just wondering if someone can point out what I'm doing wrong or missing something?
NOTE This is only for select 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 returns (which I believe is valid):
[{"id":"62","text":"Alberta Innovates Health Solutions"},{"id":"4","text":"Alterna Savins & Credit Union"},{"id":"63","text":"BC Patient Safety & Quality Council"}]