title: How to get the data response from ajax request?
body: <p>I just want to ask how can I preview the data from my ajax request? I just want to know if the data is correct.</p>
  
  <p>Here's my code.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
              var globalBase_Url = "{$base_url}" + "index.php/user_controller/processAdd/";   
  
              //alert(globalBase_Url);
  
              {literal}
  
                  $(document).ready(function(){
  
                      $('#add_cat').on('click',function(){
                          $('#add_category').show('slide');
                      });
  
                      $('#submit').on('click',function(){
  
                          var name = $('#category_name').val();
                          var desc = $('#description').val();
  
                          console.log(globalBase_Url);
  
                          $.ajax({
                              type: 'POST',
                              url: globalBAse_Url,
                              data: {cat_name:name,cat_desc:desc}, //How can I preview this?
                              dataType: 'json',
                              async: false,
                              success: function(d){
  
                              }
                          });
  
                      });
  
                  });
  
              {/literal}
  
  
          &lt;/script&gt;
  </code></pre>
  
  <p>In my controller I have this.</p>
  
  <pre><code>public function processAdd(){
  
          $cat_name = $this-&gt;input-&gt;post('cat_name');
          $cat_desc = $this-&gt;input-&gt;post('cat_desc');
  
  
  
   }
  </code></pre>
  
  <p>I used the chrome developer tools and preview it's response in XHR. But I don't see my data. By the way I am using CodeIgniter</p>