Return result from ajax calls