-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
63 lines (51 loc) · 1.52 KB
/
index.html
File metadata and controls
63 lines (51 loc) · 1.52 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
62
63
{% block body %}
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.9/semantic.min.css"/>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.9/semantic.min.js"></script>
<script type="text/javascript" >
$(document).ready(function() {
console.log($);
var content = [
{ title: 'Cash Transfer' },
{ title: 'Security Transfer' },
{ title: 'Incoming Wires' },
{ title: 'Ach-out' },
{ title: 'Ach-in' },
];
$('.ui.search')
.search({
searchFields: ['title'],
source: content
})
;
$('.ui.button')
.on('click', function() {
var data = $('#searchText').val();
console.log(data)
$.post('/processtext', {
text: data,
}).done(function(response) {
console.log(response);
$("#response").html(response);
}).fail(function() {
});
});
});
</script>
</head>
<body>
<div class="ui container" style="margin-top: 200px; ">
<div class="ui search">
<input class="prompt" id="searchText" type="text" placeholder="Search transaction..." style="width: 400px;
margin-left: 300px;">
<div class="results" style="width: 400px;
margin-left: 300px;"></div>
</div>
<div class="ui divider"></div>
<div class="ui button" style="margin-left: 450;">Show results</div>
<div class="ui divider"></div>
<div id="response"></div>
</div>
</body>
{% endblock %}