Before Cake 1.3 I would check for an ajax request with a simple $ajax->isAjax()
. Now that the AjaxHelper
has been deprecated, I'm looking for the proper way to check for an ajax request in my views. I can't find anything in the JsHelper
or HtmlHelper
methods. This seems like a really simple thing, I hope I'm not missing something obvious!
By the way, I'm aware of the RequestHandler
component ($this->RequestHandler->isAjax()
in controller), but again I'm looking for help on how to do the ajax detection in my views.
Thanks.