blob: f5d1016cd9a6247f21740ccd25b65dd6bc112bec (
plain)
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
|
document.addEventListener('DOMContentLoaded', () => {
let btn = document.querySelector('.modalButton');
btn.click();
});
const inputs = document.querySelectorAll('input');
let asulaVal;
let kaugusVal;
let teekondVal;
for (input of inputs){
input.addEventListener('input', () => {
getInputs()
});
}
function getInputs(){
let teekond = document.querySelector('.teekondInput');
let asula = document.querySelector('.asulaInput');
let kaugus = document.querySelector('.kaugusInput');
asulaVal = asula.value;
kaugusVal = kaugus.value;
teekondVal = teekond.value;
if (asulaVal != '' && kaugusVal != '' && teekondVal != '')
allGood();
}
/// All Done ///
function allGood(){
const btn = document.querySelector(".moveOn");
btn.disabled = false;
localStorage.setItem("roll", "Direktori");
localStorage.setItem("asula", asulaVal);
localStorage.setItem("kaugus", kaugusVal);
localStorage.setItem("teekond", teekondVal);
btn.onclick = () => location.href = "../../../endPage";
}
|