JS search controller