-
Notifications
You must be signed in to change notification settings - Fork 0
/
choose-file.html
44 lines (41 loc) · 1.27 KB
/
choose-file.html
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
<!DOCTYPE html>
<html>
<head>
<title>Choose login page</title>
<link rel="stylesheet" href="./choosefile.css">
</head>
<body>
<div class="container">
<p>Select Who You Are</p>
<div class="radio">
<label>
<input type="radio"name="pageoption"value="User"onchange="redirect()">User
</label><br>
<label>
<input type="radio"name="pageoption"value="Merchant"onchange="redirect()">Merchant
</label><br>
<label>
<input type="radio"name="pageoption"value="Admin"onchange="redirect()">Admin
</label><br>
</div>
</div>
<script>
function redirect() {
var radioButtons = document.getElementsByName("pageoption");
for (var i = 0; i < radioButtons.length; i++) {
if (radioButtons[i].checked) {
var selectedValue = radioButtons[i].value;
if (selectedValue == "User") {
window.location.href = "./login.html";
} else if (selectedValue == "Merchant") {
window.location.href = "./merchant-login.html";
} else if (selectedValue == "Admin") {
window.location.href = "./admin.html";
}
break;
}
}
}
</script>
</body>
</html>