Implemented ajax call for search box
handle error