Ajax Response Dosen't Work In Module

Hi everyone.

I have a module and i wrote a simple ajax call on click event, i would like to get some dat from controller with this call.

I have no errors but in ajax success function i can’t get the message from controller’s function

module/controller/BackEndAjaxController.php




        

        public function actionGetSpecificUserData()

        {

            if( !empty( $_POST["id"] ) )

            {

                print $_POST["id"]; exit;

                //echo $_POST["id"]; exit 

            }

            

        }



javascript




 $(".details").click(function(){

            

            var id = $(this).attr("id");

            

            $.ajax({

                type: "POST",

                url: baseUrl+"ControlPanel/BackEndAjax/getSpecificUserData",

                data: ({"userid" : id}),

                dataType : 'text'


              }).done(function( msg ) {

                    alert( "Data Saved: " + msg );//here only alert "Data Saved" without msg

                  });

        })



i am sorry for my English

Maybe you should use Firebug to see :

  1. If the event is triggered

  2. If yes, what is sent trough the ajax request

  3. What is the response received from this request

You should get some informations about what is going on