Finish search query in ajax, search in php in progress