1 Answer
1

If this is your entire method, it would be logical that nothing is shown in your view. Since you've disabled autoRendering with:

$this->autoRender = 0;

You need to manually render your view at some point, using:

$this->render('view');

Where view is the actual name of the view you want to render. Otherwise, you'll just get a blank page.

Also note that you're setting $results within your isAjax() check, but you set it to your view outside that check, so you will get an undefined variable error if a "regular" call (non-ajax) is made to your controller action.

I'm setting autoRender to false because I don't want render anything, all I want to do is store the data that is returned by the ajax response and then send it back to the view. Also, I'm doing $this->set(); inside the isAjax() check, above is just an example code. I haven't run into to this problem until I started using JsHelper.
–
WalterJan 8 '13 at 22:16

@Walter It sounds like you're looking for a $this->Js->request then. Check the documenation on this.
–
OldskoolJan 8 '13 at 22:26