Tag Archives: ajax request

Codeigniter: Implement ajax request with json and html response

Implementing ajax request with JSON and HTML response is quite simple as we don’t need to keep in mind to disable layout like in other frameworks. Assuming that the ajax code already exists using your preferred java-script library. Ajax request with JSON response: In controller action that hit with ajax request for JSON response, you… Read More »

Zend Framework 2 : Perform ajax request

Step 1 : Include jquery.js file in layout.phtml Step 2 : Create Contorller JavascriptController.php in /path/to/yourapp/module/Application/src/Application/Controller/

Step 3 : Create a javascript file ajax.js in /public/js/modules/javascript/ajax.js

Step 4 : Create index.phtml in /path/to/yourapp/module/Application/view/application/jsvascript/index.phtml

Step 5 : Finally, in /path/to/yourapp/module/Application/comfig/module.config.php file add following code in [view_manager] to support ajax requests