Tutorial by Examples

Controller: In the Controller you have to add the RequestHandler component. This Enables CakePHP to automatically detect Ajax requests(see: http://book.cakephp.org/2.0/en/core-libraries/components/request-handling.html for more info): class YourController extends AppController { public $compo...
One more way to use ajax in cakephp. Cakephp provide itself for ajax request. Please see example. $data = $this->Js->get('#id')->serializeForm(array('isForm' => true, 'inline' => true)); //on click send request to controller and displays response data in view $this->Js->get...

Page 1 of 1