-
Notifications
You must be signed in to change notification settings - Fork 1
/
success.html
50 lines (48 loc) · 2.06 KB
/
success.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<title>Elda Bio</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;700&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="container">
<div class="child">
<img src="eldalogo.png" alt="Logo of Elda Bio" width="253" height="100">
</div>
<div class="child">
<h1>Detect, track, and treat melanoma earlier.</h1>
</div>
<div class="child">
<div class="emailParentSuccess">
<h2>Thanks for your submission! We can't wait to change lives with you.</h2>
</div>
</div>
<div class="child">
<h2>Elda Bio is coming soon. Want to learn more? Email us at <a class="styledLink" href="mailto:[email protected]?subject=Tell me more about Elda Bio">[email protected].</a></h2>
</div>
</div>
</body>
<script>
const form = document.querySelector("#form")
const submitButton = document.querySelector("#submit")
const scriptURL = 'https://script.google.com/macros/s/AKfycbwu7aPaO13FSlrLIogRbEyfyyRm6M5ZfweMr6TeMEFuGAN1EXZtyTeND77u9AGudLK7uA/exec'
form.addEventListener('submit', e => {
submitButton.disabled = true
e.preventDefault()
let requestBody = new FormData(form)
fetch(scriptURL, { method: 'POST', body: requestBody})
.then(response => {
alert("Thanks for submitting your email! We're excited to change lives with you.")
submitButton.disabled = false
})
.catch(error => {
submitButton.disabled = false
}
)
})
</script>
</html>