Updated btnSearch javascript