Ajax Helper
Contains a function for detecting AJAX requests.
This helper is loaded using the following code:
$this->load->helper('ajax');
The following function is available:
is_ajax()
Returns a boolean value based on whether the page was requested via AJAX or not.
if (is_ajax())
{
echo 'html code requested via AJAX';
}
else
{
echo '<html><body>This page was NOT an AJAX request</body></html>';
}