-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathError.html
More file actions
executable file
·68 lines (61 loc) · 1.95 KB
/
Error.html
File metadata and controls
executable file
·68 lines (61 loc) · 1.95 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
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<meta charset="UTF-8">
<!-- Set the favicon logo -->
<link rel="icon" href="./Assets/Logo.png" type="image/x-icon" />
<!-- Import the stylesheet -->
<link rel="stylesheet" href="./Assets/w3.css">
<!-- Some more styling -->
<style>
body {padding: 30px 0;}
</style>
<!-- Get participant IDs passed in from URL -->
<script src="./Assets/GetPpantIds.js"></script>
<!-- Get DateTime_Start and ClientTimeZone (and add to TaskIO) -->
<script src="./Assets/SetDateTime.js"></script>
<script>
OnBodyLoad = function() {
const Params = new URLSearchParams(window.location.search);
// Extract the value of subjectId and error
var PoolId = Params.get("PoolId");
var SubjectId = Params.get("SubjectId");
var ErrorCode = Params.get("ErrorCode");
if (Boolean(PoolId) && PoolId != 'null') {
document.getElementById("PoolId").innerHTML = PoolId;
document.getElementById("CrashInfo0").style.visibility =
'visible';
}
if (Boolean(SubjectId) && SubjectId != 'null') {
document.getElementById("SubjectId").innerHTML = SubjectId;
document.getElementById("CrashInfo1").style.visibility =
'visible';
}
if (Boolean(ErrorCode)) {
document.getElementById("ErrorCode").innerHTML = ErrorCode;
document.getElementById("CrashInfo2").style.visibility =
'visible';
}
}
</script>
</head>
<body onload = "OnBodyLoad()";>
<center>
<h1>Oops! 😱</h1>
<p>Something has gone wrong.</p>
<p>Please report this to Sophie Johnson (sj483@sussex.ac.uk).</p>
<p>
<div id="CrashInfo0" style="visibility: hidden;">
Pool ID: <a id="PoolId"></a>
</div>
<div id="CrashInfo1" style="visibility: hidden;">
Subject ID: <a id="SubjectId"></a>
</div>
<div id="CrashInfo2" style="visibility: hidden;">
Error code: <a id="ErrorCode"></a>
</div>
</p>
</center>
</body>
</html>