title: call a php controller with ajax (how to disable layout)
body: <p>I will explain more, because it might not be clear enough</p>
  
  <p>I want to set the ajax url to: www.domain/controller/method
  I already have everything in place for this with normal php.</p>
  
  <p>But if I have to do this with ajax, I am not getting the intended result.
  The result should be some json variable being echo'd back to me.
  It is not entirely clear to me why.</p>
  
  <p>In firebug I can see that the requestheader is not the same as the responseheader.
  I see the layout view in the response. I do not know yet how to bypass that.
  The basecontroller creates the view for the layout, but I have not extended the ajaxcontroller with the basecontroller??
  For now I am running it threw another script that I call, but I would like it more if
  I could do it by the first method.</p>
  
  <p>Has anyone some suggestions, please ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It seems after the comments below I need to provide some logic to disable the layout?</p>
  
  <p><strong>first attempt:</strong></p>
  
  <pre><code>class testController extends baseController implements IController
  {
  
      public function testit()
      {
      $this-&gt;disableLayout = TRUE;
      $check='testit';
      $data =array();
      header('Content-type: application/json');
  
              $output = array(
              "check" =&gt; $check,
              "user" =&gt; $data
              );
  
              $this-&gt;content = json_encode($output);
  
              exit(0); // Stop script.
  
      }
  }
  </code></pre>
  
  <p>thanks, Richard</p>