-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
85 lines (79 loc) · 3.13 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Contact</title>
<link rel="stylesheet" href="contact.css">
</head>
<header>
<nav>
<ul class="contact-navbar">
<li><a class="nav-link" href="./index.html">Home</a></li>
<li><a class="nav-link" href="./about.html">About</a></li>
<li><a class="nav-link" href="./ajarn.html">Ajarn</a></li>
<li><a class="nav-link" href="./schedule.html">Schedule</a></li>
<li><a class="nav-link" href="./contact.html">Contact</a></li>
</ul>
</nav>
</header>
<body>
<h1>Contact Us</h1>
<div class="form">
<div class="subtitle">Let's create your account!</div>
<div class="input-container ic1">
<input id="firstname" class="input" type="text" placeholder="">
<div class="cut"></div>
<label for="firstname" class="placeholder"><strong>First name</strong></label>
</div>
<div class="input-container ic2">
<input id="lastname" class="input" type="text" placeholder="">
<div class="cut"></div>
<label for="lastname" class="placeholder"><strong>Last name</strong></label>
</div>
<div class="input-container ic2">
<input id="email" class="input" type="text" placeholder="">
<div class="cut cut-short"></div>
<label for="email" class="placeholder"><strong>Email</strong>
</label></div>
<button type="submit" class="submit"><strong>submit</strong></button>
</div>
<!-- Add this script to your HTML file -->
<script src="https://cdn.emailjs.com/dist/email.min.js"></script>
<script>
// Initialize EmailJS with your user ID
emailjs.init("sOPpYnYMAOyvZMozv");
// Add an event listener to the submit button
document.querySelector('.submit').addEventListener('click', function(event) {
event.preventDefault(); // Prevent the form from submitting
// Get the user input values from the form
const firstName = document.getElementById('firstname').value;
const lastName = document.getElementById('lastname').value;
const email = document.getElementById('email').value;
// Use the EmailJS send method to send the email
emailjs.send("service_n95a2bm", "template_ugp913i", {
from_name: firstName + " " + lastName,
to_name: "[email protected]",
message: "Email: " + email
})
.then(function(response) {
console.log("SUCCESS", response);
alert("Thank you for joining our mailing list!");
document.getElementById('firstname').value = '';
document.getElementById('lastname').value = '';
document.getElementById('email').value = '';
}, function(error) {
console.log("FAILED", error);
});
});
</script>
</body>
<footer>
<div class="logo">
<img src="https://rebrand.ly/b72ojnm" alt="Dragonfly Martial Arts and Fitness" width="55%" height="55%">
</div>
<div>
<p class="sabucco"> © 2023 The Sabucco Syndicate</p>
</div>
</footer>
</html>