How do I return a success message via ajax

Hey,

How would I return a message via ajax, to the page. Once an action has happened. I’m not talking about ajax ‘success’ and beforeSend. It has to do be an successful ajax + actually do the action I want.

like for example:


  if($user != NULL) {

                    $this->sendConfirmation($user);

                    

                  //Then I want to send a message to the page that called the action via ajax. Telling the user, I sent a confirmation and etc.


                    }

just echo the message.

I did, but its not updating on the page. Do i have to do something on the page like read the ajax request via GET or something?