[#] hm X_Shell Backd00r [#]
$(document).on('ready', funPrincipal);
function funPrincipal()
{
$('#registroAwards').on('submit', ejecutarAjax);
}
function ejecutarAjax()
{
var datosEnviados = {
'nombre': $('#txtNombre').val(),
'apellidopat': $('#txtApellidoPat').val(),
'apellidomat': $('#txtApellidoMat').val(),
'correo': $('#txtCorreo').val(),
'edad': $('#txtEdad').val()
}
$.ajax({
type : 'POST',
url : 'procesarRegistro.php',
data : datosEnviados,
dataType: 'json',
encode : true
})
.done(function(datos){
// Especificar como actuar con los datos recibidos
if(datos.exito)
alert(datos.mensaje)
else
{
if (datos.errores.usuario)
alert(datos.errores.usuario);
if (datos.errores.contra)
alert(datos.errores.contra);
}
});
event.preventDefault();
}
Mr.hm X_Shell Backd00r 1.0, Coded By Mr.hm X_Shell Backd00r