-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatm2.js
More file actions
76 lines (72 loc) · 2.25 KB
/
atm2.js
File metadata and controls
76 lines (72 loc) · 2.25 KB
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
let val1;
let password = "1234"
let currentAmmount2 = 10000;
let savingAmount2 = 10000;
let currentBalance2;
let savingBalance2;
function myFunction_2(){
document.getElementById('visit').style.display = "none";
document.getElementById('btn').style.display = "none";
document.getElementById('btn2').style.display = "none";
let h2 = document.createElement('H2')
let element = document.createElement('INPUT')
element.id = "WithDrawl"
h2.innerHTML = "Enter Number between 25 to 99";
let visit = document.getElementById('WithDrawlSet1')
visit.appendChild(h2)
visit.appendChild(element)
setTimeout(condition,5000)
}
function condition(){
val1 = document.getElementById('WithDrawl').value
console.log(val1)
if(val1>=25&&val1<=99){
window.location.replace('atm4.html')
}
else{
alert("enter the correct value")
}
}
function pinVerify(){
let pin = document.getElementById('pass').value;
if(pin == password){
document.getElementById('pass').style.display = "none"
document.getElementById('confirm').style.display = "none"
document.getElementById('transactionSet').style.display = "inline-block"
}
else{
alert('Something Went Wrong...Incorrect Pin')
}
}
function currentAccount(){
window.location.replace("atm5.html")
}
function currentAmount(){
let ammountVal = document.getElementById('currentAmount').value;
currentBalance2 = currentAmmount2-ammountVal
console.log(currentBalance2)
if(ammountVal<=10000){
document.getElementById('currentContainer').style.display = "none"
document.getElementById('informcontainerCurrent').style.display = "inline-block"
document.getElementById('info1').innerHTML = "your balance amouunt on current account is "+currentBalance2
}
else{
alert("Insufficent balance")
}
}
function savingAccount(){
window.location.replace("atm6.html")
}
function savingAmounts(){
let ammountVal = document.getElementById('savingAmount').value;
savingBalance2 = currentAmmount2-ammountVal
console.log(savingBalance2)
if(ammountVal<=10000){
document.getElementById('savingContainer').style.display = "none"
document.getElementById('informcontainerSaving').style.display = "inline-block"
document.getElementById('info2').innerHTML = "your balance amouunt on saving account is "+savingBalance2
}
else{
alert("Insufficent balance")
}
}