add ajax function for search.html file