Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function realizaProceso(valorCaja1, valorCaja2, valorCaja3){
- var parametros = {
- "valorCaja1" : valorCaja1,
- "valorCaja2" : valorCaja2,
- "valorCaja3" : valorCaja3
- };
- $.ajax({
- data: parametros, //datos que se envian a traves de ajax
- url: 'ejemplo_ajax_proceso.php', //archivo que recibe la peticion
- type: 'post', //método de envio
- beforeSend: function () {
- $("#resultado").html("Procesando, espere por favor...");
- },
- success: function (response) { //una vez que el archivo recibe el request lo procesa y lo devuelve
- $("#resultado").html(response);
- }
- });
- }
- $("enviar").on("click", realizaProceso(num, num2, text));
- Query.Deferred exception: $.ajax is not a function TypeError: $.ajax is not a function
- at realizaProceso (http://localhost/assets/js/scripts.js:7:7)
- at HTMLDocument.<anonymous> (http://localhost/assets/js/scripts.js:177:29)
- at l (http://localhost/assets/js/jquery-3.3.1.slim.min.js:2:29567)
- at c (http://localhost/assets/js/jquery-3.3.1.slim.min.js:2:29869) undefined
- Uncaught TypeError: $.ajax is not a function
- at realizaProceso (scripts.js:7)
- at HTMLDocument.<anonymous> (scripts.js:177)
- at l (jquery-3.3.1.slim.min.js:2)
- at c (jquery-3.3.1.slim.min.js:2)
Add Comment
Please, Sign In to add comment