File: /home/everest2/wmslp/sections/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style/style.css" />
<link rel="stylesheet" href="style/tablet-style.css" media="(max-width: 1024px)" />
<link rel="stylesheet" href="style/mobile-style.css" media="(max-width: 768px)" />
<title>Wright-Market</title>
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
</head>
<body>
<!-- Header Section -->
<div id="header"></div>
<!-- Hero Section -->
<div id="hero"></div>
<!-- Portfolio Section -->
<div id="portfolio"></div>
<!-- Technology Section -->
<div id="technology"></div>
<!-- Services Section -->
<div id="services"></div>
<!-- Roadmap Section -->
<div id="roadmap"></div>
<!-- Other Services Section -->
<div id="other-services"></div>
<!-- Contact Section -->
<div id="contact"></div>
<!-- Popup Forms Section -->
<div id="popup-forms"></div>
<!-- Mobile Sticky Footer Section -->
<div id="mobile-sticky-footer"></div>
<!-- Footer Section -->
<div id="footer"></div>
<script src="js/section-loader.js"></script>
<script src="js/portfolio-popup.js"></script>
<script src="js/mobile-popup.js"></script>
<script src="js/form-handler-php.js"></script>
<!-- Simple form handler as backup -->
<script>
// Simple form handler that works with dynamically loaded content
function setupFormHandlers() {
// Handle all forms
const forms = document.querySelectorAll('form');
forms.forEach(form => {
// Remove existing listeners
form.removeEventListener('submit', handleFormSubmit);
// Add new listener
form.addEventListener('submit', handleFormSubmit);
});
}
function handleFormSubmit(e) {
e.preventDefault();
const form = e.target;
const formData = new FormData(form);
const data = {};
for (let [key, value] of formData.entries()) {
data[key] = value;
}
// Show loading state
const submitBtn = form.querySelector('button[type="submit"]');
if (submitBtn) {
submitBtn.disabled = true;
submitBtn.textContent = 'Sending...';
}
// Send to PHP backend
fetch('send-email.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => {
if (result.success) {
window.location.href = '/thank-you';
} else {
alert('Error: ' + (result.error || 'Failed to send email'));
}
})
.catch(error => {
alert('Sorry, there was an error sending your message. Please try again.');
})
.finally(() => {
if (submitBtn) {
submitBtn.disabled = false;
submitBtn.textContent = 'Submit';
}
});
}
// Set up handlers when DOM loads
document.addEventListener('DOMContentLoaded', () => {
setTimeout(setupFormHandlers, 2000);
});
// Set up handlers after sections load
document.addEventListener('sectionsLoaded', () => {
setTimeout(setupFormHandlers, 500);
});
// Also check periodically
setInterval(setupFormHandlers, 3000);
</script>
<script>
let widgetId1, widgetId2, widgetId3 = null;
function enableSubmitButton(token) {
const iframes = document.querySelectorAll('iframe[src*="recaptcha"]');
for (let iframe of iframes) {
const parent = iframe.closest("form");
if (parent) {
const btn = parent.querySelector("button[type='submit']");
if (btn) btn.disabled = false;
}
}
}
function onloadCallback() {
widgetId1 = grecaptcha.render('recaptcha1', {
sitekey: '6LdKlYYrAAAAAA3eOESUfCqNSRk2bHkXerkn25mo',
callback: enableSubmitButton
});
widgetId2 = grecaptcha.render('recaptcha2', {
sitekey: '6LdKlYYrAAAAAA3eOESUfCqNSRk2bHkXerkn25mo',
callback: enableSubmitButton
});
// Do not render widgetId3 yet — render it when popup opens
}
</script>
</html>