Removing old javascript code for showing a table instead of a query