Empty results table if no results

master
Davide Bongiovanni 6 years ago
parent e9b670bea8
commit 005ea98f59

@ -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 = $('<tr onclick="show_part_info(' + data[i].id + ')"></tr>');

Loading…
Cancel
Save