-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (45 loc) · 1.28 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gnomevis Hafidz</title>
<style>
.btn {
border: none;
color: white;
padding: 14px 28px;
font-size: 16px;
cursor: pointer;
}
.typemut {background-color: #2196F3;} /* Blue */
.typemut:hover {background: #0b7dda;}
.typechr {background-color: #ff9800;} /* Orange */
.typechr:hover {background: #e68a00;}
</style>
</head>
<body>
<h1>Gnome Vis JKU</h1>
<button class="btn typemut">Type of Mutation</button>
<button class="btn typechr">Type of Chromosome</button>
<script>
var requestURL = 'https://dcc.icgc.org/api/v1/projects/GBM-US/mutations?field=id,mutation,type,chromosome,start,end&size=100&order=desc';
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'text';
request.send();
request.onload = function() {
var hasil = request.response;
var datas = JSON.parse(hasil);
gnomedata= datas['hits'];
console.log(gnomedata.length);
for(var i = 0; i < gnomedata.length; i++) {
console.log(gnomedata[i].id);
console.log(gnomedata[i].type);
console.log(gnomedata[i].chromosome);
console.log(gnomedata[i].start);
console.log(gnomedata[i].end);
}
}
</script>
</body>
</html>