Prevent query button from reloading page