-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscanning.js
More file actions
20 lines (17 loc) · 791 Bytes
/
scanning.js
File metadata and controls
20 lines (17 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// JavaScript for handling the "Scan Bottle" button click
document.getElementById('scan-bottle').addEventListener('click', function () {
window.location.href = 'scanning.html'; // Make sure the path to scanning.html is correct
});
// scan.js
document.addEventListener('DOMContentLoaded', function () {
// Simulate scanning process
setTimeout(function () {
document.getElementById('scan-bottle').textContent = 'Scanning completed! Please return to redeem points.';
// Redirect back to dashboard after 3 seconds
setTimeout(function () {
window.location.href = 'scanning.html';
// window.location.href = 'ui.html'; // Replace with actual dashboard page URL
}, 3000);
}, 5000);
// Simulate 5 seconds of scanning
});