forked from Anishkagupta04/RAPIDOC-HEALTHCARE-WEBSITE-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rateus.html
94 lines (88 loc) · 3.4 KB
/
rateus.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rate Us</title>
<link rel="stylesheet" href="rateus.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/font/bootstrap-icons.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
</head>
<body>
<header class="header_container">
<div class="img">
<img id="rd-logo" style="width: 90px; height: auto;" src="images/rd.png">
</div>
<nav class="nav_menu">
<ul class="nav_link">
<li><a href="index.html"><i class="bi bi-house-door-fill"></i> Home</a></li>
<li><a href="#about"><i class="bi bi-info-circle-fill"></i> About</a></li>
<li><a href="Html-Files/news.html"><i class="bi bi-newspaper"></i> News</a></li>
<li><a href="dex.html"><i class="bi bi-gear"></i> Service</a></li>
<li><a href="#patient-portal"><i class="bi bi-person"></i> Patient Portal</a></li>
<li><a href="#doctors"><i class="bi bi-person-circle"></i> Doctor</a></li>
<li><a href="Html-Files/contact.html"><i class="bi bi-telephone"></i> Contact us</a></li>
<li><a href="Html-Files/rateus.html"><i class="bi bi-star"></i> Rate Us</a></li>
<li><a href="login.html"><i class="bi bi-box-arrow-right"></i> Sign in/Sign up</a></li>
<li><a href="./Html-Files/Doctor Experience.html"><button>Find a Doctor</button></a></li>
</ul>
</nav>
</header>
<div class="container">
<h2>Rate Us</h2>
<div class="rating">
<span class="star" data-value="1">★</span>
<span class="star" data-value="2">★</span>
<span class="star" data-value="3">★</span>
<span class="star" data-value="4">★</span>
<span class="star" data-value="5">★</span>
</div>
<textarea id="comment" placeholder="Give Us Your Feedback :) "></textarea>
<button onclick="submitRating()">Submit</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const stars = document.querySelectorAll('.star');
stars.forEach(star => {
star.addEventListener('click', () => {
const value = star.getAttribute('data-value');
highlightStars(value);
});
});
function highlightStars(value) {
stars.forEach((star, index) => {
if (index < value) {
star.classList.add('selected');
} else {
star.classList.remove('selected');
}
});
}
});
function submitRating() {
const selectedStars = document.querySelectorAll('.star.selected');
const comment = document.getElementById('comment').value;
if (selectedStars.length > 0 && comment.trim() !== '') {
Toastify({
text: "Thanks For Your Feedback :)",
duration: 3000,
close: true,
gravity: "top",
position: "center",
backgroundColor: "#4CAF50",
}).showToast();
} else {
Toastify({
text: "Please Fill All The Details :(",
duration: 3000,
close: true,
gravity: "top",
position: "center",
backgroundColor: "#FF0000",
}).showToast();
}
}
</script>
</body>
</html>