Created
August 14, 2020 17:56
-
-
Save AdriC1705/1ffaad01486739b065367dc475b57407 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#createform").on('submit',function (event){ | |
// checar las validaciones de los campos | |
var name = $("#name").val(); | |
var last_name = $("#last_name").val(); | |
var email = $("#email").val(); | |
var password = $("#password").val(); | |
$.ajax({ | |
url: 'crear-usuarios', | |
method: 'post', | |
data: { | |
"name": name, | |
"last_name" : last_name, | |
"email" : email, | |
"pass" : password, | |
}, | |
dataType:'JSON', | |
success: function(info){ | |
if(info.Code != 200) | |
{ | |
alert(info.Message); | |
return false; | |
}else{ | |
// cerramos el modal | |
$("#addPuesto .close").click(); | |
window.location.reload(); | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment