Guest User

Untitled

a guest
Jan 24th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. function realizaProceso(valorCaja1, valorCaja2, valorCaja3){
  2. var parametros = {
  3. "valorCaja1" : valorCaja1,
  4. "valorCaja2" : valorCaja2,
  5. "valorCaja3" : valorCaja3
  6. };
  7. $.ajax({
  8. data: parametros, //datos que se envian a traves de ajax
  9. url: 'ejemplo_ajax_proceso.php', //archivo que recibe la peticion
  10. type: 'post', //método de envio
  11. beforeSend: function () {
  12. $("#resultado").html("Procesando, espere por favor...");
  13. },
  14. success: function (response) { //una vez que el archivo recibe el request lo procesa y lo devuelve
  15. $("#resultado").html(response);
  16. }
  17. });
  18. }
  19.  
  20. $("enviar").on("click", realizaProceso(num, num2, text));
  21.  
  22. Query.Deferred exception: $.ajax is not a function TypeError: $.ajax is not a function
  23. at realizaProceso (http://localhost/assets/js/scripts.js:7:7)
  24. at HTMLDocument.<anonymous> (http://localhost/assets/js/scripts.js:177:29)
  25. at l (http://localhost/assets/js/jquery-3.3.1.slim.min.js:2:29567)
  26. at c (http://localhost/assets/js/jquery-3.3.1.slim.min.js:2:29869) undefined
  27.  
  28.  
  29.  
  30. Uncaught TypeError: $.ajax is not a function
  31. at realizaProceso (scripts.js:7)
  32. at HTMLDocument.<anonymous> (scripts.js:177)
  33. at l (jquery-3.3.1.slim.min.js:2)
  34. at c (jquery-3.3.1.slim.min.js:2)
Add Comment
Please, Sign In to add comment