[978f77]: / templates / gene.html

Download this file

45 lines (43 with data), 1.1 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
{% extends 'layout.html' %}
{% block script %}
<script>
$(document).ready(function(){
load_data();
function load_data(query)
{
$.ajax({
url:"/search",
method:"POST",
data:{query:query},
success:function(data)
{
$('#result').html(data);
$("#result").append(data.htmlresponse);
}
});
}
$('#text').keypress(function(e){
var key = e.which;
if(key == 13){
var search = $(this).val();
if(search != ''){
load_data(search);
}else{
load_data();
}
}
});
});
</script>
{% endblock %}
{% block content %}
<h1 class="text-center">Gene Tool</h1>
<div class="container text-center">
<div class="container-fluid">
<div class="d-flex">
<input class="form-control me-2" type="search" name="text" id="text" placeholder="Enter Gene Symbol here to search for details of the Genes matching and Press 'ENTER'" aria-label="Search">
</div>
</div>
</div>
<div class="container text-center" style="margin-top: 5%;" id="result" name="result"></div>
{% endblock %}