-
Notifications
You must be signed in to change notification settings - Fork 13
/
u.html
93 lines (86 loc) · 2.44 KB
/
u.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#main {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: white;
}
#box {
background-color: black;
height: 50% !important;
width: 70%;
flex: 0;
padding: 10px;
border-radius: 10px;
}
form {
margin-top: 20px;
text-align: center;
}
label {
display: block;
margin-bottom: 10px;
}
input,
textarea {
width: 100%;
padding: 8px;
margin-bottom: 10px;
box-sizing: border-box; /* Ensures padding is included in the width */
}
input[type="submit"] {
background-color: #4caf50;
color: white;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
input{
border-radius: 5px;
}
</style>
</head>
<body>
<div id="main">
<div id="box">
<form action="https://sheetdb.io/api/v1/g61yskkf7kixl" method="post" id="sheetdb-form">
<label for="name">Name:</label>
<input type="text" id="name" name="data[name]" required>
<label for="feedback">Feedback:</label>
<textarea id="feedback" name="data[Feedback]" rows="4" required></textarea>
<input type="submit" value="Submit">
</form>
</div>
</div>
<script>
var form = document.getElementById('sheetdb-form');
form.addEventListener("submit", e => {
e.preventDefault();
fetch(form.action, {
method : "POST",
body: new FormData(document.getElementById("sheetdb-form")),
}).then(
response => response.json()
).then((html) => {
alert("Thank you for Your feedback");
window.location.href = "dbms.html";
});
});
</script>
<script>
// Redirect to u.html after 1 minute
setTimeout(function() {
window.location.href = 'dbms.html';
}, 20000); // 1 minute = 60,000 millisecond
</script>
</body>
</html>