Skip to content

Commit 2c263cb

Browse files
committed
Added Hint Pop-ups for the Customer Portal as well to make the website more user-friendly for first-time visitors.
1 parent 877177b commit 2c263cb

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

WebApplication2/Customer/Pages/CustomerComponent.aspx

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,37 @@
406406
}
407407
}
408408
409+
.hint-popup {
410+
position: fixed;
411+
bottom: 20px;
412+
right: 20px;
413+
width: 300px;
414+
background-color: #fff;
415+
border: 1px solid #ccc;
416+
border-radius: 10px;
417+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
418+
padding: 20px;
419+
z-index: 1000;
420+
display: none; /* Initially hidden */
421+
}
422+
423+
.hint-popup-content {
424+
position: relative;
425+
}
426+
427+
.close-btn {
428+
position: absolute;
429+
top: 1px;
430+
right: 10px;
431+
font-size: 20px;
432+
cursor: pointer;
433+
color: #333;
434+
}
435+
436+
.close-btn:hover {
437+
color: #ff0000;
438+
}
439+
409440
</style>
410441
</head>
411442
<body class="light-mode">
@@ -689,6 +720,33 @@
689720
window.location.href = 'login.aspx';
690721
}
691722
723+
// Function to show the pop-up
724+
function showPopup() {
725+
document.getElementById('hintPopup').style.display = 'block';
726+
}
727+
728+
// Function to close the pop-up
729+
function closePopup() {
730+
document.getElementById('hintPopup').style.display = 'none';
731+
sessionStorage.setItem('closedCustomer', 'true');
732+
}
733+
734+
// Show the pop-up when the page loads
735+
window.onload = function () {
736+
// Check if the user is visiting for the first time in this session
737+
if (!sessionStorage.getItem('closedCustomer')) {
738+
showPopup();
739+
}
740+
}
741+
692742
</script>
743+
744+
<div id="hintPopup" class="hint-popup">
745+
<div class="hint-popup-content">
746+
<span class="close-btn" onclick="closePopup()">&times;</span>
747+
<p><strong>Hint:</strong> Use National ID: <em>1234567</em> Additionally, refer to the Service Plans section to find Plan IDs as needed to access relevant features.</p>
748+
</div>
749+
</div>
750+
693751
</body>
694752
</html>

0 commit comments

Comments
 (0)