-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomer-portal.js
31 lines (24 loc) · 930 Bytes
/
customer-portal.js
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
const imageInput = document.getElementById('image-input')
let uploadImage = "";
imageInput.addEventListener('change', function(){
const reader = new FileReader();
reader.addEventListener('load', () => {
uploadImage = reader.result;
const displayProfile = document.getElementById('display_image').style.backgroundImage = `url(${uploadImage})`
localStorage.setItem('Image', displayProfile)
});
reader.readAsDataURL(this.files[0]);
})
function toggleBtn() {
let displayHandling = document.getElementById("profile_List");
if (displayHandling.style.display === "flex") {
displayHandling.style.display = "none";
} else {
displayHandling.style.display = "flex";
}
}
const userImg = document.getElementById('tableBanner')
const saveBtn = document.getElementById('saveBtn')
saveBtn.addEventListener('click', (e) => {
alert('successfully saved')
})