Ich benutze Select2 4.0.3 für die Liste der Clients. , wenn ich den Code in https://select2.github.io/examples.html verwenden:select2 ajax nicht feuernd
`$ajax= $(".ClientSearchSc");
/* recherche select2 + ajax */
$ajax.select2({
ajax:{
url: url+"/ajax/Cmd/Clients.php",
dataType: 'json',
delay: 0,
data: function (params) {
console.log(params.term);
return {
q: params.term, // search term
page: params.page
};
}
,
processResults: function (data,params) {
// parse the results into the format expected by Select2
// since we are using custom formatting functions we do not need to
// alter the remote JSON data, except to indicate that infinite
// scrolling can be used
params.page = params.page || 1;
return {
results: data,
pagination: {
more: (params.page * 30) < data.total_count
}
};
},
cache: true
},
minimumInputLength: 1
,
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
templateResult: clientiFormatResult,
templateSelection: clientiFormatSelection
});`
, wenn ich in Netzwerken in Chromkonsole aussehen i d'ont Client.php finden !!! und immer Kein Ergebnis in select2
kann mir bitte jemand helfen? – Funpro