Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +13 -6
templates/index.html
CHANGED
|
@@ -234,7 +234,7 @@
|
|
| 234 |
let confirmation = event.results[0][0].transcript.trim().toLowerCase();
|
| 235 |
recognition.stop();
|
| 236 |
if (confirmation.includes("yes") || confirmation.includes("ok")) {
|
| 237 |
-
//
|
| 238 |
submitRegistration();
|
| 239 |
} else {
|
| 240 |
captureMobile();
|
|
@@ -247,12 +247,19 @@
|
|
| 247 |
const email = document.getElementById('email').value;
|
| 248 |
const phone = document.getElementById('mobile').value;
|
| 249 |
|
| 250 |
-
// Simulate submission
|
| 251 |
-
document.getElementById('statusText').textContent = `Thank you for registering, ${name}!`;
|
| 252 |
-
document.getElementById('statusMessage').style.display = 'block';
|
| 253 |
setTimeout(() => {
|
| 254 |
-
|
| 255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
}
|
| 257 |
|
| 258 |
function captureLoginDetails() {
|
|
|
|
| 234 |
let confirmation = event.results[0][0].transcript.trim().toLowerCase();
|
| 235 |
recognition.stop();
|
| 236 |
if (confirmation.includes("yes") || confirmation.includes("ok")) {
|
| 237 |
+
// Automatically submit details
|
| 238 |
submitRegistration();
|
| 239 |
} else {
|
| 240 |
captureMobile();
|
|
|
|
| 247 |
const email = document.getElementById('email').value;
|
| 248 |
const phone = document.getElementById('mobile').value;
|
| 249 |
|
| 250 |
+
// Simulate submission to Salesforce
|
|
|
|
|
|
|
| 251 |
setTimeout(() => {
|
| 252 |
+
document.getElementById('statusText').textContent = `Thank you for registering, ${name}!`;
|
| 253 |
+
document.getElementById('statusMessage').style.display = 'block';
|
| 254 |
+
|
| 255 |
+
// After 6 seconds, show "Submitted Successfully" and refresh the page after 5 seconds
|
| 256 |
+
setTimeout(() => {
|
| 257 |
+
document.getElementById('statusText').textContent = 'Submitted Successfully!';
|
| 258 |
+
setTimeout(() => {
|
| 259 |
+
window.location.reload(); // Refresh after 5 seconds
|
| 260 |
+
}, 5000);
|
| 261 |
+
}, 6000);
|
| 262 |
+
}, 1000);
|
| 263 |
}
|
| 264 |
|
| 265 |
function captureLoginDetails() {
|