From 005ea98f59f8a1af5ed94ceed501bb4fe76a1aa0 Mon Sep 17 00:00:00 2001 From: Davide Bongiovanni Date: Mon, 12 Nov 2018 13:48:19 +0100 Subject: [PATCH] Empty results table if no results --- parts/static/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/static/script.js b/parts/static/script.js index 01322ea..c1a9548 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -178,8 +178,8 @@ function perform_query() { n:$('#notes').is(':checked') }; filter = '0'; + $("#results").find("tr:not(:first)").remove(); // Delete all table rows $.getJSON(rootURL + 'query/' + filter + '/' + query, data, function(data) { - $("#results").find("tr:not(:first)").remove(); // Delete all table rows for(var i = 0; i < data.length; i++) { var newRow = $('');