Some template stuff

This commit is contained in:
Stephan Porada 2019-11-18 14:24:47 +01:00
parent ae6e252830
commit ba0e82738a

View File

@ -74,13 +74,9 @@
</div> </div>
<script> <script>
socket.on('query_results', function(json_results) { socket.on('query_results', function(json_results) {
console.log('Results recieved') console.log('Results recieved');
console.log(json_results) console.log(json_results);
var queryResultsElement = document.getElementById("query-results"); });
for (let json_result of json_results) {
queryResultsElement.innerHTML += json_result['tokens'] + '<br>';
}
});
</script> </script>
<div class="col s12 m9 l9"> <div class="col s12 m9 l9">
<div class="card"> <div class="card">
@ -92,7 +88,6 @@ socket.on('query_results', function(json_results) {
</div> </div>
<script> <script>
let queryData = document.forms['query_form'].elements; let queryData = document.forms['query_form'].elements;
console.log(queryData);
var queryBtn = document.getElementById('sent_query'); var queryBtn = document.getElementById('sent_query');
queryBtn.addEventListener('click', function(event) { queryBtn.addEventListener('click', function(event) {
event.preventDefault(); event.preventDefault();