// Visa Pathfinder GPT Page JavaScript let formSubmitted = false; // Handle form submission function handleFormSubmit(event) { event.preventDefault(); if (formSubmitted) return; formSubmitted = true; const form = document.getElementById('visa-pathfinder-form'); const submitBtn = document.getElementById('submit-btn'); if (!form || !submitBtn) return; // Disable button to prevent double submission submitBtn.disabled = true; submitBtn.innerHTML = 'Opening GPT...'; // Submit form to Kit in hidden iframe form.submit(); // Open GPT in new tab immediately window.open('https://chatgpt.com/g/g-6893dcb75fec8191b93867579ab19410-visa-pathfinder', '_blank'); // Show success message setTimeout(() => { const formContainer = form.parentElement; if (formContainer) { formContainer.innerHTML = `
Your access has been granted!
The Visa Pathfinder GPT should now be open in a new tab.
Next Steps:
1. Check your new tab for the Visa Pathfinder GPT
2. Start by telling it your passport country and destination
3. Get personalized visa requirements and advice
Having trouble? Check that popup blockers are disabled.