Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to disable zend layout from controller for ajax call only?



How to disable zend layout from controller for ajax call only?..

Answer / Anjali Mishra

To disable the Zend layout for AJAX requests in your controller, you can set the response format to JSON and bypass the layout. Here's an example:
```php
$this->getResponse()->setHeader('Content-Type', 'application/json');
$this->_helper->viewRenderer->setNoRender(true);
// Your code here...
echo json_encode($result);
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Zend Interview Questions

What is the difference between zend_auth and zend_acl?

1 Answers  


How to install form component in zend framework?

1 Answers  


Where is the model in zf's mvc implementation?

1 Answers  


What do you know about zend layout?

1 Answers  


Suppose your Zend engine supports the mode Then how can u configure your PHP Zend engine to support mode?

1 Answers  


Write a program to show the execution of the application?

1 Answers  


What is zend framework 2?

1 Answers  


How to check whether a form posted or not in the zend framework?

1 Answers  


Can we call a model in view?

1 Answers  


What are the methods used in decorator?

1 Answers  


What are the difference between zend_registry and zend_session?

1 Answers  


What is the way in which the html can be used to form elements?

1 Answers  


Categories