-
Notifications
You must be signed in to change notification settings - Fork 0
/
yes.html
110 lines (101 loc) · 3.2 KB
/
yes.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
<!--
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="./yes_style.css" />
</head>
<body>
<div class="container">
<div></div>
<div class="gif_container">
<h1 class="header_text">
Your contact info is safe with me, Pookie 😊
</h1>
<img
src="https://media0.giphy.com/media/T86i6yDyOYz7J6dPhf/giphy.gif"
alt="Cute animated illustration"
/>
</div>
<div class="form_container">
<form
id="contactForm"
action="https://example.com/send-email"
method="POST"
>
<label for="name">Name:</label>
<input type="text" id="name" name="name" required />
<label for="number">Contact:</label>
<input type="tel" id="number" name="number" required />
<label for="flowers">Would you like flowers?</label>
<select id="flowers" name="flowers">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<button type="submit" class="submit_btn">Submit</button>
</form>
</div>
</div>
</body>
</html> -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="./yes_style.css" />
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js"
></script>
<script type="text/javascript">
(function () {
emailjs.init(""); // Replace with your actual public key
})();
</script>
<script type="text/javascript">
window.onload = function () {
document
.getElementById("contactForm")
.addEventListener("submit", function (event) {
event.preventDefault();
emailjs.sendForm("", "", this).then(
() => {
alert("Thank you for contacting me!");
// Optionally, redirect or clear the form here
document.getElementById("contactForm").reset(); // Reset the form after submission
},
(error) => {
alert("Failed to send message. Please try again.");
console.log("FAILED...", error);
}
);
});
};
</script>
</head>
<body>
<div class="container">
<div class="gif_container">
<h1 class="header_text">
Your contact info is safe with me, Pookie 😊
</h1>
<img
src="https://media0.giphy.com/media/T86i6yDyOYz7J6dPhf/giphy.gif"
alt="Cute animated illustration"
/>
</div>
<div class="form_container">
<form id="contactForm">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required />
<label for="number">Contact:</label>
<input type="tel" id="number" name="number" required />
<label for="flowers">Would you like flowers?</label>
<select id="flowers" name="flowers">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<button type="submit" class="submit_btn">Submit</button>
</form>
</div>
</div>
</body>
</html>