-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathload-from-url.html
43 lines (43 loc) · 1.63 KB
/
load-from-url.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
<html>
<head>
<title>Flapjack Bytes</title>
<meta charset="UTF-8">
</head>
<body>
<div>
<div>
<label for="mapfile">Map file:</label>
<input type="text" id="mapfile" name="mapfile" value="http://bioinf.hutton.ac.uk/flapjack/sample-data/tutorials/ped-ver-tutorial.map">
</div>
<div>
<label for="genofile">Genotype file:</label>
<input type="text" id="genofile" name="genofile" value="http://bioinf.hutton.ac.uk/flapjack/sample-data/tutorials/ped-ver-tutorial.dat">
</div>
<div>
<label for="phenofile">Phenotype file:</label>
<input type="text" id="phenofile" name="phenofile">
</div>
<input type="submit" action="#" id="submit" name="submit" value="Submit">
</div>
<div id="canvas-holder">
<!-- Empty div that we can insert a canvas into from javascript. -->
</div>
<script src="build/flapjack-bytes.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(){
document.getElementById("submit").addEventListener("click", function(){
var renderer = GenotypeRenderer();
renderer.renderGenotypesUrl({
domParent: "canvas-holder",
width: 800,
height: 600,
mapFileURL: document.getElementById('mapfile').value,
genotypeFileURL: document.getElementById('genofile').value,
phenotypeFileURL: document.getElementById('phenofile').value,
});
return false;
});
});
</script>
</body>
</html>