ajax calls for trials search