-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistration.js
More file actions
59 lines (51 loc) · 2.11 KB
/
Copy pathregistration.js
File metadata and controls
59 lines (51 loc) · 2.11 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
function togglePasswordVisibility(id, toogleBtnId) {
const passwordInput = document.getElementById(id);
const toggleIcon = document.getElementById(toogleBtnId);
if (passwordInput.type === "password") {
passwordInput.type = "text";
toggleIcon.innerHTML = "🔓"; // Unlocked icon
} else {
passwordInput.type = "password";
toggleIcon.innerHTML = "🔒"; // Locked icon
}
}
function handleLogin() {
// Handle login logic here
window.location.href = "/index.html";
}
function validate(pageNum) {
switch (pageNum) {
case 2:
alert()
break;
}
}
function slideNext(pageNum) {
// disappear previous page and show next page
var prevPageNum = pageNum - 1;
document.getElementById('page'+prevPageNum).style.display = 'none';
document.getElementById('page'+pageNum).style.display = 'block';
// update dots slider
switch (pageNum) {
case 2:
document.getElementById('dot1').classList.remove("active");
document.getElementById('dot1').classList.add("passed");
document.getElementById('dot2').classList.add("active");
//change btn
document.getElementById('btn1').style.display = "none";
document.getElementById('btn2').style.display = "block";
//change caption
document.getElementById('caption').innerHTML = '<strong>Step 2 of 3: </strong>Answer the Security Question. It will be used in case you forget your password in future.';
break;
case 3:
document.getElementById('dot2').classList.remove("active");
document.getElementById('dot2').classList.add("passed");
document.getElementById('dot3').classList.add("active");
//change btn
document.getElementById('btn2').style.display = "none";
document.getElementById('btn3').style.display = "block";
//change caption
document.getElementById('caption').innerHTML = '<strong>Step 3 of 3: </strong>Enter your college name and passing year.';
break;
}
}