-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdisplay_genotype.js
36 lines (32 loc) · 1.64 KB
/
display_genotype.js
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
/*global $, alert , window, jQuery, Element*/
jQuery.noConflict(); //when prototype.js is removed then this is not necessary
function load_tab_delimiter(experiment_uid, max_missing, min_maf) {
//alert (experiment_uid);
var url= 'display_genotype.php?function=typeTabDelimiter'+ '&expuid=' + experiment_uid+ '&mm='+max_missing+'&mmaf='+min_maf;
// Opens the url in the same window
window.open(url, "_self");
}
function load_tab_delimiter_GBS(experiment_uid, max_missing, min_maf) {
document.getElementById('status').innerHTML = "Creating download file";
Element.show('spinner');
var url='display_genotype.php?function=typeTabDelimiterGBS'+ '&expuid=' + experiment_uid+ '&mm='+max_missing+'&mmaf='+min_maf;
jQuery.ajax({
type: "GET",
url: "display_genotype.php",
data: 'function=typeTabDelimiterGBS'+ '&expuid=' + experiment_uid+ '&mm='+max_missing+'&mmaf='+min_maf,
success: function(data, results) {
jQuery("#results").html(data);
document.getElementById('status').innerHTML = "";
},
error: function() {
alert('Error in getting download file');
}
});
}
function mrefresh(trial_code) {
var mm = $('mm').getValue();
var mmaf = $('mmaf').getValue();
var url='display_genotype.php?function=typeData'+ '&mm='+mm+'&mmaf='+mmaf+ '&trial_code='+trial_code;
// Opens the url in the same window
window.open(url, "_self");
}