-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
124 lines (98 loc) · 4.36 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="css/style.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<link rel="icon" type="image/x-icon" href="img/GRC_logo.png">
<title>Homepage.</title>
<script type="text/javascript" src="js/set-theme.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg fixed-top navbar-dark" role="navigation">
<!-- Navbar Brand & Toggler -->
<div class="navbar-header" id="navbar-header">
<a class="navbar-brand navbar-left px-3" href="https://www.greenriver.edu/" target="_blank"><img
alt="Green River College's logo" src="img/GRC_logo_navbar.png" width="70"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-toggler"
aria-controls="navbar-toggler" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span></button>
</div>
<div class="collapse navbar-collapse" id="navbar-toggler">
<!-- Links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Resume.html">Resume</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#">Portfolio</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="https://cicada.greenriverdev.com">Application Tracking System</a></li>
<li><a class="dropdown-item" href="https://gene7.greenriverdev.com/weatherApp/">Weather App</a></li>
<li><a class="dropdown-item" href="https://gene7.greenriverdev.com/fAIson/">fAIson</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link active" href="contact.html">Contact</a>
</li>
</ul>
</div>
<!-- Dark Mode Toggler -->
<div id="darkmode-container" class="nav-item text-center px-3" hidden="true">
<input type="checkbox" id="darkmode-toggle"></input>
<label id="darkmode-label" for="darkmode-toggle"></label>
</div>
</nav>
<div class="container-fluid">
<div class="row col-12">
<header class="pt-5">
<h1 class="pt-5">Contact Me</h1>
</header>
</div>
</div>
<div class="row justify-content-center pt-5">
<form class="form-container pt-0 col-lg-6 col-md-8 col-sm-12 col-12" id="contactForm">
<label for="name">Name:</label>
<input class="form-control" type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input class="form-control" type="email" id="email" name="email" required>
<div class="mb-3">
<label for="message">Message:</label>
<textarea class="form-control" id="message" name="message" rows="5" required></textarea>
</div>
<button type="button" id="submit-button" onclick="submitForm()">Submit</button>
</form>
<script>
function submitForm() {
// Get form data
var name = document.getElementById('name').value;
var email = document.getElementById('email').value;
var message = document.getElementById('message').value;
// Create a FormData object and append form data
var formData = new FormData();
formData.append('name', name);
formData.append('email', email);
formData.append('message', message);
// Send data to PHP script using XMLHttpRequest
var xhr = new XMLHttpRequest();
xhr.open('POST', 'process.php', true);
xhr.onload = function () {
if (xhr.status == 200) {
alert('Message sent successfully!');
// You can add additional logic here if needed
} else {
alert('Error sending message. Please try again later.');
}
};
xhr.send(formData);
}
</script>
<!-- Form validation and dark mode script -->
<script type="text/javascript" src="js/script.js"></script>
</body>
</html>