hi
http://book.cakephp.org/1.3/en/view/967/isAjax
<?php class AppController extends Controller {
public function beforeFilter(){
if ($this->Auth->User()){
}else{
if($this->params['isAjax']){
// if the session expired
$return['login'] = true;
echo json_encode($return); // responseText: "{"login":true}"
}
}
}
} ?>
Best regards!
2012/8/31 Florin Trifu <[email protected]>
> Thank you!
>
> This is how I have tried in the first place but it is not working.
> $this->RequestHandler->isAjax() is null or false, so it will never execute
> the conditional code.
>
> Best regards!
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.