-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
135 lines (131 loc) · 4.35 KB
/
contact.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contact Us</title>
<link rel="stylesheet" href="contact.css" />
</head>
<body>
<header>
<span class="name"> Matt Kindig </span>
<nav class="Buttons">
<a class="active" href="index.html">HOME</a>
<a class="active2" href="about.html">ABOUT</a>
<a class="active3" href="portfolio.html">PORTFOLIO</a>
<a class="active4" href="contact.html">CONTACT</a>
</nav>
</header>
<main>
<div class="container">
<h1 class="h1-class">Connect With Us</h1>
<p>
We would love to respond to your queries and help you succeed.<br />
Feel free to get in touch with us.
</p>
<div class="contact-box">
<div class="contact-left">
<h3 class="prompt">Send your request</h3>
<form id="form" onsubmit="myFunction()">
<div class="input-row">
<div class="input-group">
<label for="fname">First Name</label>
<input
type="text"
id="fname"
name="fname"
required
placeholder="John"
/>
<label for="lname">Last name</label>
<input
type="text"
id="lname"
name="lname"
placeholder="Smith"
/>
</div>
<div class="input-group">
<label>Phone</label>
<input type="text" placeholder="+1 555 555 5555" />
</div>
<div class="input-group">
<label for="Email">Email</label>
<input type="text" placeholder="[email protected]" />
</div>
<div class="input-group">
<label>Subject</label>
<input type="text" placeholder="Product Demo" />
</div>
</div>
<label>Message</label>
<textarea rows="5" placeholder="Your Message"></textarea>
<input
onclick="Submit()"
class="Submit"
type="submit"
id="submit"
/>
</form>
</div>
<div class="contact-right">
<h3>Reach Us</h3>
<table>
<tr>
<td>Email</td>
<td>[email protected]</td>
</tr>
<tr>
<td>Phone</td>
<td>+1 800 555 5555</td>
</tr>
<tr>
<td>Address</td>
<td>
#212, Ground Floor, 7th cross<br />
1604, Enterprise Blvd, Boulder<br />
Colorado, 80301
</td>
</tr>
</table>
</div>
</div>
</div>
</main>
<footer>
<p class="watermark">Kindig Enterprises© 2023</p>
</footer>
</body>
<script>
function Submit() {
alert(
"Thanks " +
document.getElementById("fname").value +
" " +
document.getElementById("lname").value +
"!"
);
window.open("https://www.youtube.com/watch?v=aQkPcPqTq4M");
}
// add submission code
const form = document.querySelector("#form");
const submitButton = document.querySelector("#submit");
const scriptURL =
"https://script.google.com/macros/s/1XTaVdkdAnzhAHoLOA-x0K4svtJOB9RUnp2OgudFCNoEE4Lo8muDKOgSO/exec";
form.addEventListener("submit", (e) => {
submitButton.disabled = true;
e.preventDefault();
let requestBody = new FormData(form);
fetch(scriptURL, { method: "POST", body: requestBody })
.then((response) => {
alert("Success!", response);
submitButton.disabled = false;
})
.catch((error) => {
alert("Error!", error.message);
submitButton.disabled = false;
});
});
</script>
</html>