Ajax works when greet is sent