Post your trick

how to detect all ajax requests using the zend framework
Zend_Controller_Request_Http has a rudimentary method
for detecting AJAX requests: isXmlHttpRequest().
This method looks for an HTTP request
header X-Requested-With with the value 'XMLHttpRequest';
if found, it returns TRUE.

$this->getRequest()->isXmlHttpRequest()

it is important to check that your ajax requests
 contain the request header - X-Requested-With

Post A Trick !

How does "Kodetricks" work?

We at kodeplay like to share knowledge. With Kodetricks, even you can join us. All you need to do is post a programming related trick if you have one or rate a trick if you like someone else's.



Technology

Contact Us