Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $('#codigosAlumno').selectize({
  2. create: false,
  3. load: function(query, callback) {
  4. if (!query.length) return callback();
  5. console.log(query)
  6. $.ajax({
  7. url: '/Administrador/ConsultarAlumnosJSON?codigoFiltro=' + query,
  8. type: 'GET',
  9. contentType: "application/json; charset=utf-8",
  10. dataType: "json",
  11. data: {
  12. maxresults: 10
  13. },
  14.  
  15. error: function () {
  16. callback();
  17. },
  18. success: function (res) {
  19. var rspns = eval(res);
  20. console.log(rspns);
  21. callback(rspns);
  22. }
  23. });
  24. }
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement