forked from cboulay/magstim_python
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (54 loc) · 2.41 KB
/
index.html
File metadata and controls
55 lines (54 loc) · 2.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Choose a Client Type</title>
<link rel="stylesheet" type="text/css" href="Style.css" />
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript">
function PostTo(URL) {
$.ajax({
type: 'POST',
url: URL,
async: false,
error: function(jqXHR) {
alert("POST " + URL + " -> " + JSON.stringify(jqXHR));
}
});
}
window.onload = function () {
$('#ArmButton').button()
.click(function () { PostTo('/TMS/arm'); });
$('#DisarmButton').button()
.click(function () { PostTo('/TMS/disarm'); });
$('#SetLowButton').button()
.click(function () {
PostTo('/TMS/power/low/' + $('#LowPowerInput').val());
});
$('#SetHighButton').button()
.click(function () {
PostTo('/TMS/power/high/' + $('#HighPowerInput').val());
});
$('#FireLowButton').button()
.click(function () { PostTo('/TMS/fire/low'); });
$('#FireHighButton').button()
.click(function () { PostTo('/TMS/fire/high'); });
}
</script>
</head>
<body tabindex="0">
<center>
<h1>TMS Management Console: </h1>
<div id="ArmButton">Arm</div>
<div id="DisarmButton">Disarm</div></br></br>
<br>Note that the powers used will be the high/low intensities plus/minus 0, 2, or 4% </br>
<input id="LowPowerInput" type="text"></input>
<div id="SetLowButton">Set Low Intensity Power Level </div></br>
<input id="HighPowerInput" type="text"></input>
<div id="SetHighButton">Set High Intensity Power Level </div></br></br>
<div id="FireLowButton">Fire Low Intensity</div>
<div id="FireHighButton">Fire High Intensity</div>
</center>
</body>
</html>