forked from Anishkagupta04/RAPIDOC-HEALTHCARE-WEBSITE-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrateus.html
99 lines (93 loc) · 3.59 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
95
96
97
98
99
<!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="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>
</ul>
<div class="find-doctor">
<a href="./Html-Files/Doctor Experience.html"><button>Find a Doctor</button></a>
</div>
</nav>
</header>
<div class="container">
<h2>Rate Us</h2>
<div class="rating">
<span class="emoji" data-value="😢">😢</span>
<span class="emoji" data-value="😡">😡</span>
<span class="emoji" data-value="😐">😐</span>
<span class="emoji" data-value="😊">😊</span>
<span class="emoji" data-value="🤩">🤩</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 emojis = document.querySelectorAll('.emoji');
let selectedEmoji = '';
emojis.forEach(emoji => {
emoji.addEventListener('click', () => {
const value = emoji.getAttribute('data-value');
highlightEmojis(value);
selectedEmoji = value;
});
});
function highlightEmojis(value) {
emojis.forEach((emoji) => {
if (emoji.getAttribute('data-value') === value) {
emoji.classList.add('selected');
} else {
emoji.classList.remove('selected');
}
});
}
window.submitRating = function() {
const comment = document.getElementById('comment').value;
if (selectedEmoji && comment.trim() !== '') {
Toastify({
text: `Thanks For Your Feedback ${selectedEmoji} `,
duration: 3000,
close: true,
gravity: "top",
position: "center",
backgroundColor: "#4CAF50",
}).showToast();
console.log('Rating:', selectedEmoji);
console.log('Comments:', comment);
} else {
Toastify({
text: "Please Fill All The Details 😔",
duration: 3000,
close: true,
gravity: "top",
position: "center",
backgroundColor: "#FF0000",
}).showToast();
}
};
});
</script>
</body>
</html>