-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (85 loc) · 3.47 KB
/
index.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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<html>
<head lang="en">
<meta charset="UTF-8">
<title>3DUI Experiment - Siobhan O'Donovan</title>
<!--initial favicon-->
<link id="favicon" rel="icon" type="image/png" href="images/cube.png" />
<!--styles-->
<link href="libs/bootstrap/bootstrap.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div class="page-content">
<div class="container">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h2> Welcome </h2>
<hr>
<p>
Thank you for agreeing to participate in our evaluation.
Please ensure that you have been presented with your informed consent form and information booklet.
Enter your <b>Participant Number</b> below and continue.
</p>
<div class="form-horizontal" style="margin-top: 20px;">
<div class="form-group">
<div class="col-xs-offset-3 col-xs-6">
<input type="text" class="form-control" id="partNo" placeholder="Enter Participant Number">
</div>
</div>
<div class="form-group">
<div class="col-xs-offset-1 col-xs-10">
<a type="submit" onclick="proceed()" class="btn btn-primary">Continue</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<!--scripts-->
<script src="libs/jquery-1.11.3.min.js"></script>
<script src="libs/bootstrap/bootstrap.min.js"></script>
<script src="scripts/main.js"></script>
<script>
deleteAll();
$("#partNo").keypress(function(event){
var keycode = event.keyCode;
if(keycode == "13"){
proceed();
}
});
function proceed(){
disableLoadMsg();
var participantNo = document.getElementById("partNo").value.toUpperCase();
var valid = true;
var group = participantNo.slice(0, 1);
var gender = participantNo.slice(1, 2);
var num = participantNo.slice(2, participantNo.length);
// alert(num);
if(participantNo.length < 3){
valid = false;
alert("A participant number has 3 alphanumeric digits. Your participant number is invalid. Please try again!");
}
else if( group != "A" && group != "B"){
valid = false;
alert("Your participant number is invalid. Please try again!");
}
else if(gender != "F" && gender != "M"){
valid = false;
alert("Your participant number is invalid. Please try again!");
}
// else if(isInt(num) == false){
// valid = false;
// alert("Your participant number is invalid. Please try again!");
// }
if(valid){
store("participantNo", participantNo);
window.location = "pages/intro.html";
// alert("going");
}
}
// var isInt = function(n) { return parseInt(n) === n };
</script>
</html>