-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
61 lines (47 loc) · 1.45 KB
/
Copy pathmain.html
File metadata and controls
61 lines (47 loc) · 1.45 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
<head>
<script>
function httpGetAsync(theUrl, callback)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
callback(xmlHttp.responseText);
}
xmlHttp.open("GET", theUrl, true); // true for asynchronous
xmlHttp.send(null);
};
function dummy_callback(){};
function async_action_target_action_dt(target,action,dt){
// target is dummy for now
return httpGetAsync("/" + action + dt + "s",dummy_callback);
}
function async_open_1s(){
return httpGetAsync("/open1s",dummy_callback);
};
function async_open_3s(){
return httpGetAsync("/open3s",dummy_callback);
};
function async_close_1s(){
return httpGetAsync("/close1s",dummy_callback);
};
function async_close_3s(){
return httpGetAsync("/close3s",dummy_callback);
};
function async_open_10s(){
return httpGetAsync("/open10s",dummy_callback);
};
function async_close_10s(){
return httpGetAsync("/close10s",dummy_callback);
};
</script>
</head>
<body>
<span>Operations
<a href="#" onclick="async_open_1s()"> Open 1s </a> |
<a href="#" onclick="async_open_3s()"> Open 3s </a> |
<a href="#" onclick="async_close_1s()"> Close 1s </a> |
<a href="#" onclick="async_close_3s()"> Close 3s </a> |
<a href="#" onclick="async_open_10s()"> Open 10s </a> |
<a href="#" onclick="async_close_10s()"> Close 10s </a> |
</span>
</body>