title: CodeIgniter/jQuery - Ajax call returns full html page instead of my echo
body: <p>In my view I have an ajax call:</p>
  
  <pre><code>    $(".previous").click(function() {
          $.ajax({
              type: "POST",
              url: "planner/get_cal",
              data: {current_month: current_month},
              success: function(msg){
                  alert(msg);
              }
  
          });
  </code></pre>
  
  <p>the get_cal function in my Planner controller:</p>
  
  <pre><code>function get_cal()
  {
      echo "dinosaurs";
  }
  </code></pre>
  
  <p>However, instead of returning "dinosaurs", it returns a full HTML page. I can't figure out why. Thoughts? Thanks a lot.</p>