From 0f5bd9fef411858e1251f062e3fbc96d6bf4f573 Mon Sep 17 00:00:00 2001 From: d3m1g0d Date: Tue, 16 Apr 2019 17:19:33 +0200 Subject: [PATCH] fix --- frontend/frontend.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/frontend.js b/frontend/frontend.js index 6413b10..6172527 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -1,6 +1,6 @@ var globalObject; $('#update').click(function () { - globalObject = updateData(); + updateData(); fillTable(globalObject, $('table')); graphSpectralData(globalObject, $('#spectrogram')); }); @@ -11,7 +11,8 @@ function updateData () { const url = 'http://' + window.location.hostname + ':5000/data'; // I understand how bad this line looks. Please don't judge me... $.get(url, function (data, status) { // standard jQuery AJAX - return data; + globalObject = data; + console.log(data); }); }