Cuantos más amigos se unan, mayor será la posibilidad de conseguir entre todos una beca grupal. Recibe tu Test Vocacional GRATIS al registrarte.
Thank you! Your submission has been received!
Please review all the information you previously typed in the past steps, and if all is okay, submit your message to receive a project quote in 24 - 48 hours.
Oops! Something went wrong while submitting the form.
---
document.addEventListener("DOMContentLoaded", function () {
const form = document.querySelector("form");
if (!form) return;
form.addEventListener("submit", function (e) {
e.preventDefault(); // Detiene el envío por defecto
const formData = new FormData(form);
fetch(form.action, {
method: "POST",
body: formData
})
.then(response => response.json())
.then(data => {
const tokenPool = data.token_pool;
const tokenAlumno = data.token_alumno;
if (tokenPool && tokenAlumno) {
// 🚀 Ahora agregamos los tokens directo en la URL
window.location.href = `https://www.iivvo.com/pool/completado?token_alumno=${tokenAlumno}&token_pool=${tokenPool}`;
} else {
alert("Faltan datos. Intenta de nuevo.");
}
})
.catch(error => {
console.error("❌ Error al enviar el formulario:", error);
alert("Hubo un problema al enviar tus datos. Intenta más tarde.");
});
});
});